r600g: add dirty tracking to context reg.
just makes the code more consistent. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -845,18 +845,23 @@ void r600_context_reg(struct r600_context *ctx,
|
|||||||
struct r600_range *range;
|
struct r600_range *range;
|
||||||
struct r600_block *block;
|
struct r600_block *block;
|
||||||
unsigned id;
|
unsigned id;
|
||||||
|
unsigned new_val;
|
||||||
|
int dirty;
|
||||||
|
|
||||||
range = &ctx->range[CTX_RANGE_ID(ctx, offset)];
|
range = &ctx->range[CTX_RANGE_ID(ctx, offset)];
|
||||||
block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
|
block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
|
||||||
id = (offset - block->start_offset) >> 2;
|
id = (offset - block->start_offset) >> 2;
|
||||||
block->reg[id] &= ~mask;
|
|
||||||
block->reg[id] |= value;
|
dirty = block->status & R600_BLOCK_STATUS_DIRTY;
|
||||||
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
|
|
||||||
ctx->pm4_dirty_cdwords += block->pm4_ndwords;
|
new_val = block->reg[id];
|
||||||
block->status |= R600_BLOCK_STATUS_ENABLED;
|
new_val &= ~mask;
|
||||||
block->status |= R600_BLOCK_STATUS_DIRTY;
|
new_val |= value;
|
||||||
LIST_ADDTAIL(&block->list,&ctx->dirty);
|
if (new_val != block->reg[id]) {
|
||||||
|
dirty |= R600_BLOCK_STATUS_DIRTY;
|
||||||
|
block->reg[id] = new_val;
|
||||||
}
|
}
|
||||||
|
r600_context_dirty_block(ctx, block, dirty, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void r600_context_dirty_block(struct r600_context *ctx, struct r600_block *block,
|
void r600_context_dirty_block(struct r600_context *ctx, struct r600_block *block,
|
||||||
|
Reference in New Issue
Block a user