r600g: get rid of r600_context_reg
authorMarek Olšák <maraeo@gmail.com>
Sun, 29 Jan 2012 16:18:09 +0000 (17:18 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 31 Jan 2012 01:18:32 +0000 (02:18 +0100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_hw_context_priv.h

index 5026b800e9a5aabb7638b9edccc022470b355832..0d5fcb42d540e70a98296852cad5aab01d5c2011 100644 (file)
@@ -1025,33 +1025,6 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
        bo->cs_buf->last_flush = (bo->cs_buf->last_flush | flush_flags) & flush_mask;
 }
 
-void r600_context_reg(struct r600_context *ctx,
-                     unsigned offset, unsigned value,
-                     unsigned mask)
-{
-       struct r600_range *range;
-       struct r600_block *block;
-       unsigned id;
-       unsigned new_val;
-       int dirty;
-
-       range = &ctx->range[CTX_RANGE_ID(offset)];
-       block = range->blocks[CTX_BLOCK_ID(offset)];
-       id = (offset - block->start_offset) >> 2;
-
-       dirty = block->status & R600_BLOCK_STATUS_DIRTY;
-
-       new_val = block->reg[id];
-       new_val &= ~mask;
-       new_val |= value;
-       if (new_val != block->reg[id]) {
-               dirty |= R600_BLOCK_STATUS_DIRTY;
-               block->reg[id] = new_val;
-       }
-       if (dirty)
-               r600_context_dirty_block(ctx, block, dirty, id);
-}
-
 void r600_context_dirty_block(struct r600_context *ctx,
                              struct r600_block *block,
                              int dirty, int index)
index c7d5b6ad9d8e6ed590b598ae1462ea70711c3512..e2ede0fffd48319603b509a6817c7a95c9f9110b 100644 (file)
@@ -70,9 +70,6 @@ void r600_context_block_resource_emit_dirty(struct r600_context *ctx, struct r60
 void r600_context_dirty_block(struct r600_context *ctx, struct r600_block *block,
                              int dirty, int index);
 int r600_setup_block_table(struct r600_context *ctx);
-void r600_context_reg(struct r600_context *ctx,
-                     unsigned offset, unsigned value,
-                     unsigned mask);
 void r600_init_cs(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);