From 71d52a4d85af3c8a54ff37e2aa0813cae3922ac2 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Fri, 14 Apr 2023 16:45:33 -0700 Subject: [PATCH] iris: Add a barrier to iris_mcs_partial_resolve Partial resolves read from the MCS and write to the MSAA surface. Add a texture barrier to prepare for the reads. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4179 Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_resolve.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index e515c4e8971..965259e9c0c 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -553,6 +553,10 @@ iris_mcs_partial_resolve(struct iris_context *ice, struct blorp_surf surf; iris_blorp_surf_for_resource(&batch->screen->isl_dev, &surf, &res->base.b, res->aux.usage, 0, true); + + /* MCS partial resolve will read from the MCS surface. */ + assert(res->aux.bo == res->bo); + iris_emit_buffer_barrier_for(batch, res->bo, IRIS_DOMAIN_SAMPLER_READ); iris_emit_buffer_barrier_for(batch, res->bo, IRIS_DOMAIN_RENDER_WRITE); struct blorp_batch blorp_batch;