Mesa (master): glsl: disable lower_fragdata_array() for NIR drivers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 1 00:51:19 UTC 2019


Module: Mesa
Branch: master
Commit: 1c2bf82d24a12c3a25c563ca601f0da859b767e7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c2bf82d24a12c3a25c563ca601f0da859b767e7

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Wed Oct 30 11:34:27 2019 +1100

glsl: disable lower_fragdata_array() for NIR drivers

This function was added in 7e414b58640a to work around a defect in
lower_output_reads(). As of the previous commit no NIR driver calls
lower_output_reads().

This change means we don't need the special GLSL IR style
gl_FragData handling for building the resource list in a NIR based
linker.

No shader-db change on SKL i965.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/compiler/glsl/opt_dead_builtin_varyings.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/opt_dead_builtin_varyings.cpp b/src/compiler/glsl/opt_dead_builtin_varyings.cpp
index 853847ebfd5..3efe6582322 100644
--- a/src/compiler/glsl/opt_dead_builtin_varyings.cpp
+++ b/src/compiler/glsl/opt_dead_builtin_varyings.cpp
@@ -539,7 +539,8 @@ do_dead_builtin_varyings(struct gl_context *ctx,
                          tfeedback_decl *tfeedback_decls)
 {
    /* Lower the gl_FragData array to separate variables. */
-   if (consumer && consumer->Stage == MESA_SHADER_FRAGMENT) {
+   if (consumer && consumer->Stage == MESA_SHADER_FRAGMENT &&
+       !ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT].NirOptions) {
       lower_fragdata_array(consumer);
    }
 




More information about the mesa-commit mailing list