From: Timothy Arceri Date: Wed, 30 Oct 2019 00:34:27 +0000 (+1100) Subject: glsl: disable lower_fragdata_array() for NIR drivers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c2bf82d24a12c3a25c563ca601f0da859b767e7;p=mesa.git 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 --- 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); }