radeonsi: make cs_preamble_state optional
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5798>
This commit is contained in:
@@ -426,7 +426,8 @@ void si_begin_new_gfx_cs(struct si_context *ctx)
|
||||
si_pm4_reset_emitted(ctx);
|
||||
|
||||
/* The CS initialization should be emitted before everything else. */
|
||||
si_pm4_emit(ctx, ctx->cs_preamble_state);
|
||||
if (ctx->cs_preamble_state)
|
||||
si_pm4_emit(ctx, ctx->cs_preamble_state);
|
||||
if (ctx->cs_preamble_gs_rings)
|
||||
si_pm4_emit(ctx, ctx->cs_preamble_gs_rings);
|
||||
|
||||
|
@@ -195,7 +195,8 @@ static void si_destroy_context(struct pipe_context *context)
|
||||
si_resource_reference(&sctx->wait_mem_scratch, NULL);
|
||||
si_resource_reference(&sctx->small_prim_cull_info_buf, NULL);
|
||||
|
||||
si_pm4_free_state(sctx, sctx->cs_preamble_state, ~0);
|
||||
if (sctx->cs_preamble_state)
|
||||
si_pm4_free_state(sctx, sctx->cs_preamble_state, ~0);
|
||||
if (sctx->cs_preamble_gs_rings)
|
||||
si_pm4_free_state(sctx, sctx->cs_preamble_gs_rings, ~0);
|
||||
for (i = 0; i < ARRAY_SIZE(sctx->vgt_shader_config); i++)
|
||||
|
Reference in New Issue
Block a user