Add array sizing/checking/overlapping semantics for tessellation inputs.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24594 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
e8fe7b81d7
commit
08d182470b
8 changed files with 152 additions and 21 deletions
|
|
@ -42,4 +42,19 @@ layout(vertices = 5) out; // ERROR
|
|||
void foo()
|
||||
{
|
||||
gl_out[4].gl_PointSize; // ERROR
|
||||
}
|
||||
}
|
||||
|
||||
in vec2 ina; // ERROR, not array
|
||||
in vec2 inb[];
|
||||
in vec2 inc[18]; // ERROR, wrong size
|
||||
in vec2 ind[gl_MaxPatchVertices];
|
||||
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 3) in vec4 ivla[];
|
||||
layout(location = 4) in vec4 ivlb[];
|
||||
layout(location = 4) in vec4 ivlc[]; // ERROR
|
||||
|
||||
layout(location = 3) out vec4 ovla[];
|
||||
layout(location = 4) out vec4 ovlb[];
|
||||
layout(location = 4) out vec4 ovlc[]; // ERROR
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ float gl_ClipDistance[1];
|
|||
in gl_PerVertex
|
||||
{
|
||||
float gl_ClipDistance[1];
|
||||
} gl_in[gl_MaxPatchVertices];
|
||||
} gl_in[];
|
||||
|
||||
layout(quads, cw) out; // ERROR
|
||||
layout(triangles) out; // ERROR
|
||||
|
|
@ -70,3 +70,30 @@ layout(equal_spacing) out; // ERROR
|
|||
layout(fractional_even_spacing) out; // ERROR
|
||||
layout(point_mode) out; // ERROR
|
||||
|
||||
in vec2 ina; // ERROR, not array
|
||||
in vec2 inb[];
|
||||
in vec2 inc[18]; // ERROR, wrong size
|
||||
in vec2 ind[gl_MaxPatchVertices];
|
||||
|
||||
in testbla {
|
||||
int f;
|
||||
} bla; // ERROR, not array
|
||||
|
||||
in testblb {
|
||||
int f;
|
||||
} blb[];
|
||||
|
||||
in testblc {
|
||||
int f;
|
||||
} blc[18]; // ERROR wrong size
|
||||
|
||||
in testbld {
|
||||
int f;
|
||||
} bld[gl_MaxPatchVertices];
|
||||
|
||||
layout(location = 23) in vec4 ivla[];
|
||||
layout(location = 24) in vec4 ivlb[];
|
||||
layout(location = 24) in vec4 ivlc[]; // ERROR
|
||||
|
||||
layout(location = 23) out vec4 ovla[2];
|
||||
layout(location = 24) out vec4 ovlb[2]; // ERROR
|
||||
|
|
|
|||
|
|
@ -219,7 +219,11 @@ ERROR: 0:10: 'patch' : can only use on output in tessellation-control shader
|
|||
ERROR: 0:39: 'vertices' : can only apply to 'out'
|
||||
ERROR: 0:40: 'vertices' : cannot change previously set layout value
|
||||
ERROR: 0:44: '[' : array index out of range '4'
|
||||
ERROR: 7 compilation errors. No code generated.
|
||||
ERROR: 0:47: 'in' : type must be an array: ina
|
||||
ERROR: 0:49: '[]' : tessellation input array size must be gl_MaxPatchVertices or unsized
|
||||
ERROR: 0:56: 'location' : repeated use of location 4
|
||||
ERROR: 0:60: 'location' : repeated use of location 4
|
||||
ERROR: 11 compilation errors. No code generated.
|
||||
|
||||
|
||||
vertices = 4
|
||||
|
|
@ -337,6 +341,16 @@ ERROR: node is still EOpNull!
|
|||
0:? 'patchIn' (patch in 4-component vector of float)
|
||||
0:? 'patchOut' (patch out 4-component vector of float)
|
||||
0:? 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
|
||||
0:? 'ina' (in 2-component vector of float)
|
||||
0:? 'inb' (in 32-element array of 2-component vector of float)
|
||||
0:? 'inc' (in 32-element array of 2-component vector of float)
|
||||
0:? 'ind' (in 32-element array of 2-component vector of float)
|
||||
0:? 'ivla' (layout(location=3 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlb' (layout(location=4 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlc' (layout(location=4 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ovla' (layout(location=3 ) out 4-element array of 4-component vector of float)
|
||||
0:? 'ovlb' (layout(location=4 ) out 4-element array of 4-component vector of float)
|
||||
0:? 'ovlc' (layout(location=4 ) out 4-element array of 4-component vector of float)
|
||||
|
||||
400.tese
|
||||
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
|
||||
|
|
@ -363,7 +377,13 @@ ERROR: 0:68: 'fractional_odd_spacing' : can only apply to 'in'
|
|||
ERROR: 0:69: 'equal_spacing' : can only apply to 'in'
|
||||
ERROR: 0:70: 'fractional_even_spacing' : can only apply to 'in'
|
||||
ERROR: 0:71: 'point_mode' : can only apply to 'in'
|
||||
ERROR: 23 compilation errors. No code generated.
|
||||
ERROR: 0:73: 'in' : type must be an array: ina
|
||||
ERROR: 0:75: '[]' : tessellation input array size must be gl_MaxPatchVertices or unsized
|
||||
ERROR: 0:78: 'in' : type must be an array: bla
|
||||
ERROR: 0:86: '[]' : tessellation input array size must be gl_MaxPatchVertices or unsized
|
||||
ERROR: 0:96: 'location' : repeated use of location 24
|
||||
ERROR: 0:99: 'location' : repeated use of location 24
|
||||
ERROR: 29 compilation errors. No code generated.
|
||||
|
||||
|
||||
input primitive = quads
|
||||
|
|
@ -469,6 +489,19 @@ ERROR: node is still EOpNull!
|
|||
0:? 'badp3' (noperspective patch in 4-component vector of float)
|
||||
0:? 'badp4' (patch sample in 3-component vector of float)
|
||||
0:? 'gl_in' (in 32-element array of block{gl_ClipDistance})
|
||||
0:? 'ina' (in 2-component vector of float)
|
||||
0:? 'inb' (in 32-element array of 2-component vector of float)
|
||||
0:? 'inc' (in 32-element array of 2-component vector of float)
|
||||
0:? 'ind' (in 32-element array of 2-component vector of float)
|
||||
0:? 'bla' (in block{f})
|
||||
0:? 'blb' (in 32-element array of block{f})
|
||||
0:? 'blc' (in 32-element array of block{f})
|
||||
0:? 'bld' (in 32-element array of block{f})
|
||||
0:? 'ivla' (layout(location=23 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlb' (layout(location=24 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlc' (layout(location=24 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ovla' (layout(location=23 ) out 2-element array of 4-component vector of float)
|
||||
0:? 'ovlb' (layout(location=24 ) out 2-element array of 4-component vector of float)
|
||||
|
||||
410.tesc
|
||||
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
|
||||
|
|
@ -1036,6 +1069,16 @@ vertices = 4
|
|||
0:? 'patchOut' (patch out 4-component vector of float)
|
||||
0:? 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
|
||||
0:? 'patchIn' (patch in 4-component vector of float)
|
||||
0:? 'ina' (in 2-component vector of float)
|
||||
0:? 'inb' (in 32-element array of 2-component vector of float)
|
||||
0:? 'inc' (in 32-element array of 2-component vector of float)
|
||||
0:? 'ind' (in 32-element array of 2-component vector of float)
|
||||
0:? 'ivla' (layout(location=3 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlb' (layout(location=4 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlc' (layout(location=4 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ovla' (layout(location=3 ) out 4-element array of 4-component vector of float)
|
||||
0:? 'ovlb' (layout(location=4 ) out 4-element array of 4-component vector of float)
|
||||
0:? 'ovlc' (layout(location=4 ) out 4-element array of 4-component vector of float)
|
||||
0:? 'a' (out 3-element array of int)
|
||||
0:? 'outb' (out 5-element array of int)
|
||||
0:? 'outc' (out 4-element array of int)
|
||||
|
|
@ -1307,6 +1350,19 @@ ERROR: node is still EOpNull!
|
|||
0:? 'badp3' (noperspective patch in 4-component vector of float)
|
||||
0:? 'badp4' (patch sample in 3-component vector of float)
|
||||
0:? 'gl_in' (in 32-element array of block{gl_ClipDistance})
|
||||
0:? 'ina' (in 2-component vector of float)
|
||||
0:? 'inb' (in 32-element array of 2-component vector of float)
|
||||
0:? 'inc' (in 32-element array of 2-component vector of float)
|
||||
0:? 'ind' (in 32-element array of 2-component vector of float)
|
||||
0:? 'bla' (in block{f})
|
||||
0:? 'blb' (in 32-element array of block{f})
|
||||
0:? 'blc' (in 32-element array of block{f})
|
||||
0:? 'bld' (in 32-element array of block{f})
|
||||
0:? 'ivla' (layout(location=23 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlb' (layout(location=24 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ivlc' (layout(location=24 ) in 32-element array of 4-component vector of float)
|
||||
0:? 'ovla' (layout(location=23 ) out 2-element array of 4-component vector of float)
|
||||
0:? 'ovlb' (layout(location=24 ) out 2-element array of 4-component vector of float)
|
||||
0:? 'a' (const 2X2 matrix of float)
|
||||
0:? 1.000000
|
||||
0:? 0.000000
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
TARGETDIR=localResults
|
||||
BASEDIR=baseResults
|
||||
EXE=./glslangValidator.exe
|
||||
mkdir -p localResults
|
||||
|
||||
#
|
||||
# configuration file tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue