block->reg[i] = state->regs[i].value;
}
}
-
- r600_context_dirty_block(ctx, block, dirty, 2);
+ if (dirty)
+ r600_context_dirty_block(ctx, block, dirty, 2);
}
static inline void evergreen_context_ps_partial_flush(struct r600_context *ctx)
if (dirty & R600_BLOCK_STATUS_DIRTY)
evergreen_context_ps_partial_flush(ctx);
- r600_context_dirty_block(ctx, block, dirty, 4);
+ if (dirty)
+ r600_context_dirty_block(ctx, block, dirty, 4);
}
void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id)
dirty |= R600_BLOCK_STATUS_DIRTY;
block->reg[id] = new_val;
}
- r600_context_dirty_block(ctx, block, dirty, id);
+ 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)
{
- if (dirty && (index + 1) > block->nreg_dirty)
+ if ((index + 1) > block->nreg_dirty)
block->nreg_dirty = index + 1;
if ((dirty != (block->status & R600_BLOCK_STATUS_DIRTY)) || !(block->status & R600_BLOCK_STATUS_ENABLED)) {
dirty |= R600_BLOCK_STATUS_DIRTY;
}
- r600_context_dirty_block(ctx, block, dirty, id);
+ if (dirty)
+ r600_context_dirty_block(ctx, block, dirty, id);
}
}
dirty = block->status & R600_BLOCK_STATUS_DIRTY;
for (i = 0; i < num_regs; i++) {
- if (block->reg[i] != state->regs[i].value) {
+ if (dirty || (block->reg[i] != state->regs[i].value)) {
dirty |= R600_BLOCK_STATUS_DIRTY;
block->reg[i] = state->regs[i].value;
}
state->regs[2].bo->bo->binding |= BO_BOUND_TEXTURE;
}
}
- r600_context_dirty_block(ctx, block, dirty, num_regs - 1);
+ if (dirty)
+ r600_context_dirty_block(ctx, block, dirty, num_regs - 1);
}
void r600_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
}
}
- r600_context_dirty_block(ctx, block, dirty, 2);
+ if (dirty)
+ r600_context_dirty_block(ctx, block, dirty, 2);
}
static inline void r600_context_ps_partial_flush(struct r600_context *ctx)
* will end up using the new border color. */
if (dirty & R600_BLOCK_STATUS_DIRTY)
r600_context_ps_partial_flush(ctx);
-
- r600_context_dirty_block(ctx, block, dirty, 3);
+ if (dirty)
+ r600_context_dirty_block(ctx, block, dirty, 3);
}
void r600_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id)