summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-07-01 19:10:36 -0400
committerIlia Mirkin <[email protected]>2016-07-05 21:22:01 -0400
commita37e46323c7e18bec4160f2f66847c10b7041dc1 (patch)
tree9a7a853cfded640ae27bcedefb1a60aafa76724d /src/compiler
parent795d8dff89c7e6841f61e3b9851de95765f4d001 (diff)
glsl: don't try to lower non-gl builtins as if they were gl_FragData
If a shader has an output array, it will get treated as though it were gl_FragData and rewritten into gl_out_FragData instances. We only want this to happen on the actual gl_FragData and not everything else. This is a small part of the problem pointed out by the below bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96765 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "11.2 12.0" <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/opt_dead_builtin_varyings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/opt_dead_builtin_varyings.cpp b/src/compiler/glsl/opt_dead_builtin_varyings.cpp
index 7feea3ba18b..a28887f7cff 100644
--- a/src/compiler/glsl/opt_dead_builtin_varyings.cpp
+++ b/src/compiler/glsl/opt_dead_builtin_varyings.cpp
@@ -85,7 +85,8 @@ public:
{
ir_variable *var = ir->variable_referenced();
- if (!var || var->data.mode != this->mode || !var->type->is_array())
+ if (!var || var->data.mode != this->mode || !var->type->is_array() ||
+ !is_gl_identifier(var->name))
return visit_continue;
/* Only match gl_FragData[], not gl_SecondaryFragDataEXT[] */