From 1c2bf82d24a12c3a25c563ca601f0da859b767e7 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 30 Oct 2019 11:34:27 +1100 Subject: [PATCH] glsl: disable lower_fragdata_array() for NIR drivers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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); } -- 2.30.2