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 <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22545>
This commit is contained in:
Nanley Chery 2023-04-14 16:45:33 -07:00 committed by Marge Bot
parent a1ed41dec7
commit 71d52a4d85

View file

@ -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;