From ce4575b3b5950041589cd2b96a8334146d8cec32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 24 May 2020 08:34:30 -0400 Subject: [PATCH] radeonsi: remove unused leftover code for INDIRECT_BUFFER inside IBs Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pm4.c | 14 +------------- src/gallium/drivers/radeonsi/si_pm4.h | 3 --- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c index 00db2ff15bf..a409b6efdd6 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -98,7 +98,6 @@ void si_pm4_clear_state(struct si_pm4_state *state) { for (int i = 0; i < state->nbo; ++i) si_resource_reference(&state->bo[i], NULL); - si_resource_reference(&state->indirect_buffer, NULL); state->nbo = 0; state->ndw = 0; } @@ -125,18 +124,7 @@ void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state) state->bo_priority[i]); } - if (!state->indirect_buffer) { - radeon_emit_array(cs, state->pm4, state->ndw); - } else { - struct si_resource *ib = state->indirect_buffer; - - radeon_add_to_buffer_list(sctx, sctx->gfx_cs, ib, RADEON_USAGE_READ, RADEON_PRIO_IB2); - - radeon_emit(cs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); - radeon_emit(cs, ib->gpu_address); - radeon_emit(cs, ib->gpu_address >> 32); - radeon_emit(cs, (ib->b.b.width0 >> 2) & 0xfffff); - } + radeon_emit_array(cs, state->pm4, state->ndw); if (state->atom.emit) state->atom.emit(sctx); diff --git a/src/gallium/drivers/radeonsi/si_pm4.h b/src/gallium/drivers/radeonsi/si_pm4.h index cde42ba1eca..34dc9be8472 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.h +++ b/src/gallium/drivers/radeonsi/si_pm4.h @@ -41,9 +41,6 @@ struct si_atom { }; struct si_pm4_state { - /* optional indirect buffer */ - struct si_resource *indirect_buffer; - /* PKT3_SET_*_REG handling */ unsigned last_opcode; unsigned last_reg; -- 2.30.2