glsl/linker: Allow fragment output overlap for gl_LastFragData.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 14 Jul 2016 19:57:14 +0000 (12:57 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 24 Aug 2016 20:28:31 +0000 (13:28 -0700)
gl_LastFragData overlaps gl_FragData by definition.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/linker.cpp

index a1a65ef..4b404ff 100644 (file)
@@ -2673,6 +2673,9 @@ assign_attribute_or_color_locations(void *mem_ctx,
          }
       }
 
+      if (strcmp(var->name, "gl_LastFragData") == 0)
+         continue;
+
       /* From GL4.5 core spec, section 15.2 (Shader Execution):
        *
        *     "Output binding assignments will cause LinkProgram to fail: