Commit 79742d41 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot
Browse files

radv: declare index_va in a single call for indexed draw packet emit

this is an extreme hotpath, so having a single calculation in a const
variable is slightly better for compiler microoptimizing
Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <>
Part-of: <!11124>
parent 4fd9c6d9
......@@ -5354,7 +5354,6 @@ radv_emit_draw_packets_indexed(struct radv_cmd_buffer *cmd_buffer,
const struct radv_cmd_state *state = &cmd_buffer->state;
const int index_size = radv_get_vgt_index_size(state->index_type);
uint64_t index_va;
uint32_t remaining_indexes = cmd_buffer->state.max_index_count;
remaining_indexes = MAX2(remaining_indexes, info->first_index) - info->first_index;
......@@ -5364,8 +5363,7 @@ radv_emit_draw_packets_indexed(struct radv_cmd_buffer *cmd_buffer,
index_va = state->index_va;
index_va += first_index * index_size;
const uint64_t index_va = state->index_va + first_index * index_size;
if (!state->subpass->view_mask) {
radv_cs_emit_draw_indexed_packet(cmd_buffer, index_va, remaining_indexes, count);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment