r600g: get rid of the mask in r600_pipe_reg
authorMarek Olšák <maraeo@gmail.com>
Sun, 29 Jan 2012 06:39:08 +0000 (07:39 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 31 Jan 2012 01:18:23 +0000 (02:18 +0100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600.h
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_state_common.c

index c6a27904d78c3667e497ebf3b784554566e8b656..a51e6af36c1f0d62f5cd18655518615eef445360 100644 (file)
@@ -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;
index e6aed10885c3e480cf2908d42dcb4838c0a44aae..7941ee2fba4b2d64333de471b4f39d9b653192f7 100644 (file)
@@ -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)
index ca43ec76bcf34c53a0b64d8c4174fcd3be216d30..09a7d730053f9eb633010349ef178159c5ff935d 100644 (file)
@@ -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;