r600g: drop unused code in evergreen.
authorDave Airlie <airlied@redhat.com>
Wed, 22 Dec 2010 05:58:29 +0000 (15:58 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 22 Dec 2010 05:58:29 +0000 (15:58 +1000)
this code was pretty much duplicated, thanks to Henri Verbeet on irc for
pointing it out.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600.h
src/gallium/winsys/r600/drm/evergreen_hw_context.c

index 8a69a10fc80559a3b3f30653865d2e639bdb1c10..719b29f2ea39079e453ebf87ba8f317854478033 100644 (file)
@@ -1359,7 +1359,7 @@ void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx)
                                        0x00000000, 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_03001C_RESOURCE0_WORD7,
                                        0xC0000000, 0xFFFFFFFF, NULL);
-               evergreen_fs_resource_set(&rctx->ctx, rstate, i);
+               evergreen_context_pipe_state_set_fs_resource(&rctx->ctx, rstate, i);
        }
 }
 
index aa456d493f7b098bd2f77e4da29d002e5b46347c..85e296650530a1db8db0f3693913f9b97ff40f8c 100644 (file)
@@ -284,10 +284,6 @@ void r600_context_queries_resume(struct r600_context *ctx);
 
 int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon);
 void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *draw);
-void evergreen_ps_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
-void evergreen_vs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
-void evergreen_fs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
-
 void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
 void evergreen_context_pipe_state_set_vs_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
 void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
index 2175d578ec770fedd255243a0b05345395e049f4..47d73c2e094fdc10a366745af10a3ca314f3d910 100644 (file)
@@ -880,59 +880,3 @@ void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *dr
        ctx->pm4_dirty_cdwords = 0;
 }
 
-static inline void evergreen_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset)
-{
-       struct r600_range *range;
-       struct r600_block *block;
-
-       range = &ctx->range[CTX_RANGE_ID(ctx, offset)];
-       block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
-       block->reg[0] = state->regs[0].value;
-       block->reg[1] = state->regs[1].value;
-       block->reg[2] = state->regs[2].value;
-       block->reg[3] = state->regs[3].value;
-       block->reg[4] = state->regs[4].value;
-       block->reg[5] = state->regs[5].value;
-       block->reg[6] = state->regs[6].value;
-       block->reg[7] = state->regs[7].value;
-       r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
-       r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
-       if (state->regs[0].bo) {
-               /* VERTEX RESOURCE, we preted there is 2 bo to relocate so
-                * we have single case btw VERTEX & TEXTURE resource
-                */
-               r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
-               r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
-       } else {
-               /* TEXTURE RESOURCE */
-               r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
-               r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
-       }
-       if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
-               block->status |= R600_BLOCK_STATUS_ENABLED;
-               block->status |= R600_BLOCK_STATUS_DIRTY;
-               ctx->pm4_dirty_cdwords += block->pm4_ndwords + block->pm4_flush_ndwords;
-               LIST_ADDTAIL(&block->list,&ctx->dirty);
-       }
-}
-
-void evergreen_ps_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
-{
-       unsigned offset = R_030000_RESOURCE0_WORD0 + 0x20 * rid;
-
-       evergreen_resource_set(ctx, state, offset);
-}
-
-void evergreen_vs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
-{
-       unsigned offset = R_030000_RESOURCE0_WORD0 + 0x1600 + 0x20 * rid;
-
-       evergreen_resource_set(ctx, state, offset);
-}
-
-void evergreen_fs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
-{
-       unsigned offset = R_030000_RESOURCE0_WORD0 + 0x7C00 + 0x20 * rid;
-
-       evergreen_resource_set(ctx, state, offset);
-}