This will simplify things when we break out per-shader-stage dirty bits.
Signed-off-by: Rob Clark <robdclark@gmail.com>
*/
fd_hw_query_set_stage(batch, batch->draw, FD_STAGE_NULL);
- batch->ctx->dirty = ~0;
+ fd_context_all_dirty(batch->ctx);
batch_flush_reset_dependencies(batch, true);
if (batch->ctx->screen->reorder) {
mtx_unlock(&ctx->screen->lock);
}
+/* mark all state dirty: */
+static inline void
+fd_context_all_dirty(struct fd_context *ctx)
+{
+ ctx->dirty = ~0;
+}
+
static inline struct pipe_scissor_state *
fd_context_get_scissor(struct fd_context *ctx)
{
if (ctx->in_blit) {
fd_batch_reset(batch);
- ctx->dirty = ~0;
+ fd_context_all_dirty(ctx);
}
batch->blit = ctx->in_blit;
ctx->streamout.offsets[i] += info->count;
if (fd_mesa_debug & FD_DBG_DDRAW)
- ctx->dirty = 0xffffffff;
+ fd_context_all_dirty(ctx);
fd_batch_check_size(batch);
if (ctx->in_blit) {
fd_batch_reset(batch);
- ctx->dirty = ~0;
+ fd_context_all_dirty(ctx);
}
/* for bookkeeping about which buffers have been cleared (and thus
FD_DIRTY_FRAMEBUFFER;
if (fd_mesa_debug & FD_DBG_DCLEAR)
- ctx->dirty = 0xffffffff;
+ fd_context_all_dirty(ctx);
}
static void
fd_batch_reference(&ctx->batch, NULL);
fd_reset_wfi(batch);
ctx->batch = batch;
- ctx->dirty = ~0;
+ fd_context_all_dirty(ctx);
if (old_batch && old_batch->blit && !old_batch->back_blit) {
/* for blits, there is not really much point in hanging on