[Mesa-dev] [PATCH 13/17] glsl/linker: Allow fragment output overlap for gl_LastFragData.

Francisco Jerez currojerez at riseup.net
Thu Jul 21 04:49:43 UTC 2016


gl_LastFragData overlaps gl_FragData by definition.
---
 src/compiler/glsl/linker.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 6d45a02..aeaeb9c 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2692,6 +2692,9 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
 	 }
       }
 
+      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:
-- 
2.9.0



More information about the mesa-dev mailing list