Skip to content
Snippets Groups Projects
Commit 450f0764 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Emil Velikov
Browse files

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: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a37e4632)
parent 168fdc6a
No related branches found
No related tags found
Loading
......@@ -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[] */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment