From b7cd3a083a4ddd29405bdde36986a09eb8851532 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 25 Jun 2018 08:25:22 -0700 Subject: [PATCH] iris: rework DEBUG_REEMIT don't want to have to special case this everywhere --- src/gallium/drivers/iris/iris_draw.c | 3 +++ src/gallium/drivers/iris/iris_state.c | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index 7153f7cafe3..f12e317e016 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -37,6 +37,9 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) struct iris_context *ice = (struct iris_context *) ctx; struct iris_batch *batch = &ice->render_batch; + if (unlikely(INTEL_DEBUG & DEBUG_REEMIT)) + ice->state.dirty |= ~0ull; + iris_batch_maybe_flush(batch, 1500); // XXX: actually do brw_cache_flush_for_* diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 67d098d601a..5e5af76ffb6 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2333,8 +2333,7 @@ iris_restore_context_saved_bos(struct iris_context *ice, { // XXX: whack IRIS_SHADER_DIRTY_BINDING_TABLE on new batch - const uint64_t clean = - unlikely(INTEL_DEBUG & DEBUG_REEMIT) ? 0ull : ~ice->state.dirty; + const uint64_t clean = ~ice->state.dirty; if (clean & IRIS_DIRTY_CC_VIEWPORT) { iris_use_optional_res(batch, ice->state.last_res.cc_vp, false); @@ -2430,8 +2429,7 @@ iris_upload_render_state(struct iris_context *ice, struct iris_batch *batch, const struct pipe_draw_info *draw) { - const uint64_t dirty = - unlikely(INTEL_DEBUG & DEBUG_REEMIT) ? ~0ull : ice->state.dirty; + const uint64_t dirty = ice->state.dirty; struct brw_wm_prog_data *wm_prog_data = (void *) ice->shaders.prog[MESA_SHADER_FRAGMENT]->prog_data; -- 2.30.2