summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-06-08 14:02:00 +1000
committerDave Airlie <[email protected]>2011-06-08 14:04:26 +1000
commitf659cc46bc80923694b88d8fc9549705d8ca90aa (patch)
tree0e04e2a671e4a38a7819a7d86b3a4147a1c201bc /src
parenta5329d4f789f0336780b38d9513cad1ed5cf1e07 (diff)
r600g: only add blocks once to the dirty/enabled lists.
This caused a loop in some tests. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 50a6dec38ba..42492997df9 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -110,9 +110,11 @@ static void r600_init_block(struct r600_context *ctx,
block->flags |= REG_FLAG_DIRTY_ALWAYS;
}
if (reg[i+j].flags & REG_FLAG_ENABLE_ALWAYS) {
- block->status |= R600_BLOCK_STATUS_ENABLED;
- LIST_ADDTAIL(&block->enable_list, &ctx->enable_list);
- LIST_ADDTAIL(&block->list,&ctx->dirty);
+ if (!(block->status & R600_BLOCK_STATUS_ENABLED)) {
+ block->status |= R600_BLOCK_STATUS_ENABLED;
+ LIST_ADDTAIL(&block->enable_list, &ctx->enable_list);
+ LIST_ADDTAIL(&block->list,&ctx->dirty);
+ }
}
if (reg[i+j].flags & REG_FLAG_NEED_BO) {