GLSL Linker: Track entry point across compilation units.
authorJohn Kessenich <cepheus@frii.com>
Sat, 10 Dec 2016 00:14:27 +0000 (17:14 -0700)
committerJohn Kessenich <cepheus@frii.com>
Sat, 10 Dec 2016 00:14:27 +0000 (17:14 -0700)
This wasn't needed until the recent generalization of "main" to "entry point",
so makes some HLSL-specific code be generic now, for GLSL functional correctness.

Test/baseResults/150.tesc.out
Test/baseResults/mains1.frag.out
glslang/Include/revision.h
glslang/MachineIndependent/linkValidate.cpp

index 1736bf0..28162b2 100644 (file)
@@ -910,8 +910,10 @@ ERROR: node is still EOpNull!
 
 Linked tessellation control stage:
 
+ERROR: Linking tessellation control stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
+ERROR: Linking tessellation control stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation control stage: Contradictory layout vertices values
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
@@ -921,6 +923,7 @@ ERROR: Linking tessellation control stage: Types must match:
     gl_out: "out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}" versus "out implicitly-sized array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}"
 ERROR: Linking tessellation control stage: Types must match:
     outa: "global 4-element array of int" versus "global 1-element array of int"
+ERROR: Linking tessellation control stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
@@ -934,8 +937,10 @@ ERROR: Linking tessellation control stage: Types must match:
 
 Linked tessellation evaluation stage:
 
+ERROR: Linking tessellation evaluation stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation evaluation stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
+ERROR: Linking tessellation evaluation stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation evaluation stage: Contradictory input layout primitives
 ERROR: Linking tessellation evaluation stage: Contradictory input vertex spacing
 ERROR: Linking tessellation evaluation stage: Contradictory triangle ordering
index 0b5c2b7..426a1a8 100644 (file)
@@ -48,6 +48,7 @@ ERROR: Linking geometry stage: At least one shader must specify a layout(max_ver
 
 Linked fragment stage:
 
+ERROR: Linking fragment stage: can't handle multiple entry points per stage
 ERROR: Linking fragment stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
 
index 62856cc..00779ec 100644 (file)
@@ -3,4 +3,4 @@
 // For the date, it uses the current date (when then script is run).
 
 #define GLSLANG_REVISION "Overload400-PrecQual.1686"
-#define GLSLANG_DATE "08-Dec-2016"
+#define GLSLANG_DATE "09-Dec-2016"
index 8e14bbb..614a3b9 100644 (file)
@@ -82,7 +82,7 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
     if (source != unit.source)
         error(infoSink, "can't link compilation units from different source languages");
 
-    if (source == EShSourceHlsl && unit.getNumEntryPoints() > 0) {
+    if (unit.getNumEntryPoints() > 0) {
         if (getNumEntryPoints() > 0)
             error(infoSink, "can't handle multiple entry points per stage");
         else