From 9344ab382a1765c1a7c2560e771485edf4954fe2 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 29 Jan 2012 07:39:08 +0100 Subject: r600g: get rid of the mask in r600_pipe_reg Reviewed-by: Dave Airlie Reviewed-by: Alex Deucher --- src/gallium/drivers/r600/r600.h | 1 - src/gallium/drivers/r600/r600_hw_context.c | 8 ++------ src/gallium/drivers/r600/r600_state_common.c | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index c6a27904d78..a51e6af36c1 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -111,7 +111,6 @@ struct r600_resource { struct r600_pipe_reg { u32 value; - u32 mask; struct r600_block *block; struct r600_resource *bo; enum radeon_bo_usage bo_usage; diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index e6aed10885c..7941ee2fba4 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -1077,7 +1077,6 @@ void r600_context_dirty_block(struct r600_context *ctx, void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_state *state) { struct r600_block *block; - unsigned new_val; int dirty; for (int i = 0; i < state->nregs; i++) { unsigned id, reloc_id; @@ -1088,11 +1087,8 @@ void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_stat dirty = block->status & R600_BLOCK_STATUS_DIRTY; - new_val = block->reg[id]; - new_val &= ~reg->mask; - new_val |= reg->value; - if (new_val != block->reg[id]) { - block->reg[id] = new_val; + if (reg->value != block->reg[id]) { + block->reg[id] = reg->value; dirty |= R600_BLOCK_STATUS_DIRTY; } if (block->flags & REG_FLAG_DIRTY_ALWAYS) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index ca43ec76bcf..09a7d730053 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -814,7 +814,6 @@ void _r600_pipe_state_add_reg(struct r600_context *ctx, state->regs[state->nregs].id = (offset - block->start_offset) >> 2; state->regs[state->nregs].value = value; - state->regs[state->nregs].mask = 0xFFFFFFFF; state->regs[state->nregs].bo = bo; state->regs[state->nregs].bo_usage = usage; @@ -832,7 +831,6 @@ void r600_pipe_state_add_reg_noblock(struct r600_pipe_state *state, state->regs[state->nregs].id = offset; state->regs[state->nregs].block = NULL; state->regs[state->nregs].value = value; - state->regs[state->nregs].mask = 0xFFFFFFFF; state->regs[state->nregs].bo = bo; state->regs[state->nregs].bo_usage = usage; -- cgit v1.2.3