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

Submitted by Francisco Jerez on July 21, 2016, 4:49 a.m.

Details

Message ID 20160721044947.14076-13-currojerez@riseup.net
State New
Headers show
Series "Framebuffer fetch." ( rev: 8 ) in Mesa

Not browsing as part of any series.

Commit Message

Francisco Jerez July 21, 2016, 4:49 a.m.
gl_LastFragData overlaps gl_FragData by definition.
---
 src/compiler/glsl/linker.cpp | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

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: