From: Kenneth Graunke Date: Mon, 25 Jun 2018 15:25:22 +0000 (-0700) Subject: iris: rework DEBUG_REEMIT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7cd3a083a4ddd29405bdde36986a09eb8851532;p=mesa.git iris: rework DEBUG_REEMIT don't want to have to special case this everywhere --- 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;