diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pm4.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.h | 1 |
6 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 983a0976b04..5ebd0be2218 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -142,8 +142,7 @@ void si_begin_new_cs(struct si_context *ctx) si_pm4_reset_emitted(ctx); /* The CS initialization should be emitted before everything else. */ - si_pm4_emit(ctx, ctx->queued.named.init); - ctx->emitted.named.init = ctx->queued.named.init; + si_pm4_emit(ctx, ctx->init_config); ctx->clip_regs.dirty = true; ctx->framebuffer.atom.dirty = true; diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 02c02ab07d3..4d8fd65d981 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -47,6 +47,7 @@ static void si_destroy_context(struct pipe_context *context) pipe_resource_reference(&sctx->null_const_buf.buffer, NULL); r600_resource_reference(&sctx->border_color_table, NULL); + si_pm4_free_state(sctx, sctx->init_config, ~0); si_pm4_delete_state(sctx, gs_rings, sctx->gs_rings); si_pm4_delete_state(sctx, gs_onoff, sctx->gs_on); si_pm4_delete_state(sctx, gs_onoff, sctx->gs_off); diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index b2caef02eb1..08c41e795c8 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -101,6 +101,7 @@ struct si_context { void *custom_blend_decompress; void *custom_blend_fastclear; struct si_screen *screen; + struct si_pm4_state *init_config; union { struct { diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c index 21ab9f24b21..27293464e5c 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -169,7 +169,6 @@ void si_pm4_emit_dirty(struct si_context *sctx) if (!state || sctx->emitted.array[i] == state) continue; - assert(state != sctx->queued.named.init); si_pm4_emit(sctx, state); sctx->emitted.array[i] = state; } diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 5a417b0211c..b6b40916dfe 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3085,5 +3085,5 @@ void si_init_config(struct si_context *sctx) si_pm4_set_reg(pm4, R_00B01C_SPI_SHADER_PGM_RSRC3_PS, S_00B01C_CU_EN(0xffff)); } - si_pm4_set_state(sctx, init, pm4); + sctx->init_config = pm4; } diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 0e067670c17..504b428816c 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -88,7 +88,6 @@ struct si_vertex_element union si_state { struct { - struct si_pm4_state *init; struct si_state_blend *blend; struct si_pm4_state *blend_color; struct si_pm4_state *clip; |