From 8252bb0ec6d429b09d944826d1ddbead69387f0f Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 6 May 2020 15:40:30 -0700 Subject: OPTIONAL: iris: Perform BLORP buffer barriers outside of iris_blorp_exec() hook. The iris_blorp_exec() hook needs to be executed under a single indivisible sync region, which means that in cases where we need to emit a PIPE_CONTROL for a buffer barrier we won't be able to track the subsequent commands separately from the previous commands, which will prevent us from optimizing out subsequent PIPE_CONTROLs if we encounter the same buffers again. In particular I've encountered this situation in some SynMark test-cases which perform lots of BLORP operations with the same buffer bound as both source and destination (in order to generate mipmaps): In such a scenario if the source requires flushing we'd also end up flushing for the destination redundantly, even though a single PIPE_CONTROL would have been sufficient. This avoids a 4.5% FPS regression in SynMark OglHdrBloom and a 3.5% FPS regression in SynMark OglMultithread. Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_resolve.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/iris/iris_resolve.c') diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index 71530f4b311..0350e58a225 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -450,6 +450,7 @@ iris_mcs_partial_resolve(struct iris_context *ice, struct blorp_surf surf; iris_blorp_surf_for_resource(&batch->screen->isl_dev, &surf, &res->base, res->aux.usage, 0, true); + iris_emit_buffer_barrier_for(batch, res->bo, IRIS_DOMAIN_RENDER_WRITE); struct blorp_batch blorp_batch; iris_batch_sync_region_start(batch); -- cgit v1.2.3