diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/opt_dead_builtin_varyings.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/glsl/opt_dead_builtin_varyings.cpp b/src/compiler/glsl/opt_dead_builtin_varyings.cpp index 900a09697bb..4526f2bca00 100644 --- a/src/compiler/glsl/opt_dead_builtin_varyings.cpp +++ b/src/compiler/glsl/opt_dead_builtin_varyings.cpp @@ -89,9 +89,10 @@ public: !is_gl_identifier(var->name)) return visit_continue; - /* Only match gl_FragData[], not gl_SecondaryFragDataEXT[] */ - if (this->find_frag_outputs && var->data.location == FRAG_RESULT_DATA0 && - var->data.index == 0) { + /* Only match gl_FragData[], not gl_SecondaryFragDataEXT[] or + * gl_LastFragData[]. + */ + if (this->find_frag_outputs && strcmp(var->name, "gl_FragData") == 0) { this->fragdata_array = var; ir_constant *index = ir->array_index->as_constant(); |