mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
r600g: remove duplicated evergreen_context_pipe_state_set_sampler
Reviewed-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
edc0ce292b
commit
84db8f9a22
3 changed files with 5 additions and 31 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue