diff options
author | Marek Olšák <[email protected]> | 2012-02-21 19:54:17 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-02-23 20:29:56 +0100 |
commit | 84db8f9a2289f3ae7eb0af4825f4370e31e4ae11 (patch) | |
tree | 73b18804a43b495ad41f64d78fe6e611a4e5292c /src | |
parent | edc0ce292b5a34ba1e2ef96c0b530fbf8428e67d (diff) |
r600g: remove duplicated evergreen_context_pipe_state_set_sampler
Reviewed-by: Jerome Glisse <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_hw_context.c | 31 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context_priv.h | 1 |
3 files changed, 5 insertions, 31 deletions
diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c b/src/gallium/drivers/r600/evergreen_hw_context.c index a5474754552..b0620a2762b 100644 --- a/src/gallium/drivers/r600/evergreen_hw_context.c +++ b/src/gallium/drivers/r600/evergreen_hw_context.c @@ -774,33 +774,6 @@ out_err: return r; } -static inline void evergreen_context_pipe_state_set_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset) -{ - struct r600_range *range; - struct r600_block *block; - int i; - int dirty; - - range = &ctx->range[CTX_RANGE_ID(offset)]; - block = range->blocks[CTX_BLOCK_ID(offset)]; - if (state == NULL) { - block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY); - LIST_DELINIT(&block->list); - LIST_DELINIT(&block->enable_list); - return; - } - dirty = block->status & R600_BLOCK_STATUS_DIRTY; - - for (i = 0; i < 3; i++) { - if (block->reg[i] != state->regs[i].value) { - dirty |= R600_BLOCK_STATUS_DIRTY; - block->reg[i] = state->regs[i].value; - } - } - if (dirty) - r600_context_dirty_block(ctx, block, dirty, 2); -} - static inline void evergreen_context_ps_partial_flush(struct r600_context *ctx) { struct radeon_winsys_cs *cs = ctx->cs; @@ -861,7 +834,7 @@ void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struc unsigned offset; offset = 0x0003C000 + id * 0xc; - evergreen_context_pipe_state_set_sampler(ctx, state, offset); + r600_context_pipe_state_set_sampler(ctx, state, offset); evergreen_context_pipe_state_set_sampler_border(ctx, state, R_00A400_TD_PS_SAMPLER0_BORDER_INDEX, id); } @@ -870,7 +843,7 @@ void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struc unsigned offset; offset = 0x0003C0D8 + id * 0xc; - evergreen_context_pipe_state_set_sampler(ctx, state, offset); + r600_context_pipe_state_set_sampler(ctx, state, offset); evergreen_context_pipe_state_set_sampler_border(ctx, state, R_00A414_TD_VS_SAMPLER0_BORDER_INDEX, id); } diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index e73b609126f..b0a0f300248 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -992,7 +992,7 @@ void r600_context_pipe_state_set_fs_resource(struct r600_context *ctx, struct r6 r600_context_pipe_state_set_resource(ctx, state, block); } -static inline void r600_context_pipe_state_set_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset) +void r600_context_pipe_state_set_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset) { struct r600_range *range; struct r600_block *block; @@ -1008,6 +1008,7 @@ static inline void r600_context_pipe_state_set_sampler(struct r600_context *ctx, return; } dirty = block->status & R600_BLOCK_STATUS_DIRTY; + for (i = 0; i < 3; i++) { if (block->reg[i] != state->regs[i].value) { block->reg[i] = state->regs[i].value; @@ -1019,7 +1020,6 @@ static inline void r600_context_pipe_state_set_sampler(struct r600_context *ctx, r600_context_dirty_block(ctx, block, dirty, 2); } - static inline void r600_context_pipe_state_set_sampler_border(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset) { struct r600_range *range; diff --git a/src/gallium/drivers/r600/r600_hw_context_priv.h b/src/gallium/drivers/r600/r600_hw_context_priv.h index 70018901940..5894320472b 100644 --- a/src/gallium/drivers/r600/r600_hw_context_priv.h +++ b/src/gallium/drivers/r600/r600_hw_context_priv.h @@ -64,6 +64,7 @@ void r600_context_dirty_block(struct r600_context *ctx, struct r600_block *block int r600_setup_block_table(struct r600_context *ctx); int r600_resource_init(struct r600_context *ctx, struct r600_range *range, unsigned offset, unsigned nblocks, unsigned stride, struct r600_reg *reg, int nreg, unsigned offset_base); int r600_state_sampler_init(struct r600_context *ctx, uint32_t offset); +void r600_context_pipe_state_set_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset); /* * evergreen_hw_context.c |