radeonsi: remove unused si_pm4_state code
authorMarek Olšák <marek.olsak@amd.com>
Sun, 30 Aug 2015 10:35:02 +0000 (12:35 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 1 Sep 2015 19:51:15 +0000 (21:51 +0200)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/si_pm4.c
src/gallium/drivers/radeonsi/si_pm4.h

index 9c4d7ec8ba3809c38acd7d4bfa69f57cbce88100..1ae252a862989a959c26e2cdc3f69003c4aba233 100644 (file)
@@ -124,37 +124,16 @@ void si_pm4_free_state(struct si_context *sctx,
        si_pm4_free_state_simple(state);
 }
 
-unsigned si_pm4_dirty_dw(struct si_context *sctx)
-{
-       unsigned count = 0;
-
-       for (int i = 0; i < NUMBER_OF_STATES; ++i) {
-               struct si_pm4_state *state = sctx->queued.array[i];
-
-               if (!state || sctx->emitted.array[i] == state)
-                       continue;
-
-               count += state->ndw;
-       }
-
-       return count;
-}
-
 void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state)
 {
        struct radeon_winsys_cs *cs = sctx->b.rings.gfx.cs;
+
        for (int i = 0; i < state->nbo; ++i) {
                radeon_add_to_buffer_list(&sctx->b, &sctx->b.rings.gfx, state->bo[i],
                                      state->bo_usage[i], state->bo_priority[i]);
        }
 
-       memcpy(&cs->buf[cs->cdw], state->pm4, state->ndw * 4);
-
-       for (int i = 0; i < state->nrelocs; ++i) {
-               cs->buf[cs->cdw + state->relocs[i]] += cs->cdw << 2;
-       }
-
-       cs->cdw += state->ndw;
+       radeon_emit_array(cs, state->pm4, state->ndw);
 }
 
 void si_pm4_emit_dirty(struct si_context *sctx)
index d2158827f5818be0ab70c271b3e83af6c9a8026f..7a8f5a025506f12845a4a0b2963621fc9f82b51c 100644 (file)
@@ -54,10 +54,6 @@ struct si_pm4_state
        enum radeon_bo_usage    bo_usage[SI_PM4_MAX_BO];
        enum radeon_bo_priority bo_priority[SI_PM4_MAX_BO];
 
-       /* relocs for shader data */
-       unsigned        nrelocs;
-       unsigned        relocs[SI_PM4_MAX_RELOCS];
-
        bool compute_pkt;
 };
 
@@ -76,7 +72,6 @@ void si_pm4_free_state(struct si_context *sctx,
                       struct si_pm4_state *state,
                       unsigned idx);
 
-unsigned si_pm4_dirty_dw(struct si_context *sctx);
 void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state);
 void si_pm4_emit_dirty(struct si_context *sctx);
 void si_pm4_reset_emitted(struct si_context *sctx);