aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_compile.c
diff options
context:
space:
mode:
authorIcecream95 <[email protected]>2020-07-08 16:00:51 +1200
committerMarge Bot <[email protected]>2020-07-13 13:35:11 +0000
commit18059f48f845c3f1358a36528b17bbe90bf140af (patch)
tree52e814368301659d453bff8f2569e889af647a84 /src/panfrost/midgard/midgard_compile.c
parent7781d2c2eadc52c6a21fac5ffc22614b43e61e72 (diff)
pan/mdg: Set the z/s store intrinsic base correctly
When EXT_shader_framebuffer_fetch is used and only depth and/or stencil are written, we can't rely on the first output being to depth/stencil. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755>
Diffstat (limited to 'src/panfrost/midgard/midgard_compile.c')
-rw-r--r--src/panfrost/midgard/midgard_compile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index dc878c65f44..dec1f38e094 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -401,7 +401,12 @@ midgard_nir_lower_zs_store(nir_shader *nir)
combined_store->num_components = 4;
- nir_intrinsic_set_base(combined_store, 0);
+ unsigned base;
+ if (z_store)
+ base = nir_intrinsic_base(z_store);
+ else
+ base = nir_intrinsic_base(s_store);
+ nir_intrinsic_set_base(combined_store, base);
unsigned writeout = 0;
if (z_store)