mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
amd: skip redundant PKT3_NUM_INSTANCES even with register shadowing
same as PAL Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>
This commit is contained in:
parent
6349d3f537
commit
2ce24402d6
2 changed files with 2 additions and 4 deletions
|
|
@ -8874,7 +8874,7 @@ radv_before_draw(struct radv_cmd_buffer *cmd_buffer, const struct radv_draw_info
|
|||
struct radv_cmd_state *state = &cmd_buffer->state;
|
||||
struct radeon_cmdbuf *cs = cmd_buffer->cs;
|
||||
assert(state->vtx_base_sgpr);
|
||||
if (state->last_num_instances != info->instance_count || cmd_buffer->device->uses_shadow_regs) {
|
||||
if (state->last_num_instances != info->instance_count) {
|
||||
radeon_emit(cs, PKT3(PKT3_NUM_INSTANCES, 0, false));
|
||||
radeon_emit(cs, info->instance_count);
|
||||
state->last_num_instances = info->instance_count;
|
||||
|
|
|
|||
|
|
@ -1630,9 +1630,7 @@ static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw
|
|||
radeon_emit(di_src_sel);
|
||||
}
|
||||
} else {
|
||||
/* Register shadowing requires that we always emit PKT3_NUM_INSTANCES. */
|
||||
if (sctx->shadowing.registers ||
|
||||
sctx->last_instance_count == SI_INSTANCE_COUNT_UNKNOWN ||
|
||||
if (sctx->last_instance_count == SI_INSTANCE_COUNT_UNKNOWN ||
|
||||
sctx->last_instance_count != instance_count) {
|
||||
radeon_emit(PKT3(PKT3_NUM_INSTANCES, 0, 0));
|
||||
radeon_emit(instance_count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue