summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorPavel Asyutchenko <sventeam@yandex.ru>2021-12-04 00:38:56 +0300
committerMarge Bot <emma+marge@anholt.net>2022-06-22 04:32:44 +0000
commit8788b175969c8adadb36921b4634d1e3db6aee06 (patch)
treea148b4d35adaa2b10478dcd5ec4efa7a65123911 /src/gallium/auxiliary
parent959b7480388aa499c00fa2bd531cba92b7799c94 (diff)
nir_to_tgsi: Don't count ZS fbfetch vars as outputs
Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13979>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/nir/nir_to_tgsi_info.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c
index 80db4e5e193..72998d20ebf 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c
@@ -717,7 +717,8 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
info->colors_written |= 1 << semantic_index;
break;
case TGSI_SEMANTIC_STENCIL:
- info->writes_stencil = true;
+ if (!variable->data.fb_fetch_output)
+ info->writes_stencil = true;
break;
case TGSI_SEMANTIC_SAMPLEMASK:
info->writes_samplemask = true;
@@ -726,10 +727,12 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
info->writes_edgeflag = true;
break;
case TGSI_SEMANTIC_POSITION:
- if (info->processor == PIPE_SHADER_FRAGMENT)
- info->writes_z = true;
- else
+ if (info->processor == PIPE_SHADER_FRAGMENT) {
+ if (!variable->data.fb_fetch_output)
+ info->writes_z = true;
+ } else {
info->writes_position = true;
+ }
break;
}