radeonsi: remove init config from states
authorMarek Olšák <marek.olsak@amd.com>
Tue, 30 Dec 2014 23:42:22 +0000 (00:42 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Jan 2015 11:06:43 +0000 (12:06 +0100)
It really doesn't do anything there.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_hw_context.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_pm4.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state.h

index 983a0976b044ce344acf4154ef6a2090181b9c62..5ebd0be22182d83d4e7a1c9b0938565d9cea21b5 100644 (file)
@@ -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;
index 02c02ab07d314234112f136f388bfac24cebb021..4d8fd65d981570437fb0eb66f362a0bd07dfeb54 100644 (file)
@@ -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);
index b2caef02eb18abaacc3bf17c71eba65ffe071775..08c41e795c86a25812b89541a7240a8e796afe67 100644 (file)
@@ -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 {
index 21ab9f24b2138804674af3e8750946c406da4cb8..27293464e5cef56bbc454f5fd7249c004120fb15 100644 (file)
@@ -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;
        }
index 5a417b0211c54989e0cf1e5a5071334291b19eeb..b6b40916dfe294ddcf9915d5c1e3d0e144526dd1 100644 (file)
@@ -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;
 }
index 0e067670c17f82dcba1285e743f2041425931373..504b428816c9e6e8db0c4052fc0a77196eefc5ca 100644 (file)
@@ -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;