diff options
author | Kenneth Graunke <[email protected]> | 2018-11-27 15:30:16 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:10 -0800 |
commit | 761a5fb36ac86516ffc16f2af7f7b07250756e43 (patch) | |
tree | e144cc7470ba19ccaf6a1f199bace3d3502628b0 /src/gallium/drivers/iris/iris_draw.c | |
parent | 40b12c103ca0173a1223c2cb37fe40901881b5ec (diff) |
iris: fix conditional compute, don't stomp predicate for pipelined queries
Diffstat (limited to 'src/gallium/drivers/iris/iris_draw.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_draw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index a5b4c63d54f..4b8205a2bbe 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -37,6 +37,7 @@ #include "util/u_upload_mgr.h" #include "intel/compiler/brw_compiler.h" #include "iris_context.h" +#include "iris_defines.h" /** * Record the current primitive mode and restart information, flagging @@ -70,6 +71,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->batches[IRIS_BATCH_RENDER]; + if (ice->state.predicate == IRIS_PREDICATE_STATE_DONT_RENDER) + return; + if (unlikely(INTEL_DEBUG & DEBUG_REEMIT)) ice->state.dirty |= ~0ull; @@ -148,6 +152,9 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid) struct iris_context *ice = (struct iris_context *) ctx; struct iris_batch *batch = &ice->batches[IRIS_BATCH_COMPUTE]; + if (ice->state.predicate == IRIS_PREDICATE_STATE_DONT_RENDER) + return; + if (unlikely(INTEL_DEBUG & DEBUG_REEMIT)) ice->state.dirty |= ~0ull; @@ -164,6 +171,13 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid) iris_binder_reserve_compute(ice); ice->vtbl.update_surface_base_address(batch, &ice->state.binder); + + if (ice->state.compute_predicate) { + ice->vtbl.load_register_mem64(batch, MI_PREDICATE_DATA, + ice->state.compute_predicate, 0); + ice->state.compute_predicate = NULL; + } + ice->vtbl.upload_compute_state(ice, batch, grid); ice->state.dirty &= ~IRIS_ALL_DIRTY_FOR_COMPUTE; |