Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
116c30b6
Commit
116c30b6
authored
Dec 12, 2013
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tessellation: implement 'patch' semantics.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24486
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
a57a78ed
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
313 additions
and
221 deletions
+313
-221
400.frag
Test/400.frag
+3
-0
400.geom
Test/400.geom
+4
-0
400.tesc
Test/400.tesc
+2
-0
400.tese
Test/400.tese
+8
-0
420.vert
Test/420.vert
+4
-0
400.frag.out
Test/baseResults/400.frag.out
+5
-1
400.geom.out
Test/baseResults/400.geom.out
+6
-1
400.tesc.out
Test/baseResults/400.tesc.out
+92
-89
400.tese.out
Test/baseResults/400.tese.out
+99
-88
420.vert.out
Test/baseResults/420.vert.out
+6
-1
Types.h
glslang/Include/Types.h
+1
-1
revision.h
glslang/Include/revision.h
+2
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+79
-38
glslang.y
glslang/MachineIndependent/glslang.y
+2
-0
No files found.
Test/400.frag
View file @
116c30b6
...
@@ -53,3 +53,6 @@ void foo23()
...
@@ -53,3 +53,6 @@ void foo23()
textureProjGradOffset
(
u2drs
,
outp
,
vec2
(
0
.
0
),
vec2
(
0
.
0
),
offsets
[
2
]);
// ERROR, offset out of range
textureProjGradOffset
(
u2drs
,
outp
,
vec2
(
0
.
0
),
vec2
(
0
.
0
),
offsets
[
2
]);
// ERROR, offset out of range
textureProjGradOffset
(
u2drs
,
outp
,
vec2
(
0
.
0
),
vec2
(
0
.
0
),
ivec2
(
-
10
,
20
));
// ERROR, offset out of range
textureProjGradOffset
(
u2drs
,
outp
,
vec2
(
0
.
0
),
vec2
(
0
.
0
),
ivec2
(
-
10
,
20
));
// ERROR, offset out of range
}
}
patch
in
vec4
patchIn
;
// ERROR
patch
out
vec4
patchOut
;
// ERROR
Test/400.geom
View file @
116c30b6
...
@@ -54,3 +54,6 @@ void foo3()
...
@@ -54,3 +54,6 @@ void foo3()
layout
(
location
=
4
)
in
vec4
cva
[
3
];
layout
(
location
=
4
)
in
vec4
cva
[
3
];
layout
(
location
=
5
)
in
vec4
cvb
[
3
];
layout
(
location
=
5
)
in
vec4
cvb
[
3
];
layout
(
location
=
2
)
in
mat3
cmc
[
3
];
// ERROR, collision
layout
(
location
=
2
)
in
mat3
cmc
[
3
];
// ERROR, collision
patch
in
vec4
patchIn
;
// ERROR
patch
out
vec4
patchOut
;
// ERROR
\ No newline at end of file
Test/400.tesc
View file @
116c30b6
...
@@ -7,6 +7,8 @@ layout(quads) in; // ERROR
...
@@ -7,6 +7,8 @@ layout(quads) in; // ERROR
layout(ccw) out; // ERROR
layout(ccw) out; // ERROR
layout(fractional_even_spacing) in; // ERROR
layout(fractional_even_spacing) in; // ERROR
patch in vec4 patchIn; // ERROR
patch out vec4 patchOut;
void main()
void main()
{
{
...
...
Test/400.tese
View file @
116c30b6
...
@@ -14,6 +14,9 @@ layout(fractional_even_spacing) in; // ERROR
...
@@ -14,6 +14,9 @@ layout(fractional_even_spacing) in; // ERROR
layout(point_mode) in;
layout(point_mode) in;
patch in vec4 patchIn;
patch out vec4 patchOut; // ERROR
void main()
void main()
{
{
barrier(); // ERROR
barrier(); // ERROR
...
@@ -40,3 +43,8 @@ void main()
...
@@ -40,3 +43,8 @@ void main()
gl_PointSize = ps;
gl_PointSize = ps;
gl_ClipDistance[2] = cd;
gl_ClipDistance[2] = cd;
}
}
smooth patch in vec4 badp1; // ERROR
flat patch in vec4 badp2; // ERROR
noperspective patch in vec4 badp3; // ERROR
patch sample in vec3 badp4; // ERROR
Test/420.vert
View file @
116c30b6
...
@@ -81,3 +81,6 @@ int fgfg(float f, highp int i);
...
@@ -81,3 +81,6 @@ int fgfg(float f, highp int i);
out
gl_PerVertex
{
out
gl_PerVertex
{
float
gl_ClipDistance
[
4
];
float
gl_ClipDistance
[
4
];
};
};
patch
in
vec4
patchIn
;
// ERROR
patch
out
vec4
patchOut
;
// ERROR
\ No newline at end of file
Test/baseResults/400.frag.out
View file @
116c30b6
...
@@ -13,7 +13,9 @@ ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset,
...
@@ -13,7 +13,9 @@ ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset,
ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
ERROR: 13 compilation errors. No code generated.
ERROR: 0:57: 'patch' : not supported in this stage: fragment
ERROR: 0:58: 'patch' : not supported in this stage: fragment
ERROR: 15 compilation errors. No code generated.
gl_FragCoord pixel center is integer
gl_FragCoord pixel center is integer
...
@@ -204,6 +206,8 @@ ERROR: node is still EOpNull!
...
@@ -204,6 +206,8 @@ ERROR: node is still EOpNull!
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:? 'u2drs' (uniform sampler2DRectShadow)
0:? 'u2drs' (uniform sampler2DRectShadow)
0:? 'patchIn' (smooth patch in 4-component vector of float)
0:? 'patchOut' (patch out 4-component vector of float)
Linked fragment stage:
Linked fragment stage:
...
...
Test/baseResults/400.geom.out
View file @
116c30b6
400.geom
400.geom
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:13: 'invocations' : can only apply to a standalone qualifier
ERROR: 0:13: 'invocations' : can only apply to a standalone qualifier
ERROR: 0:20: 'patch' : not supported in this stage: geometry
ERROR: 0:20: 'gl_PointSize' : cannot add layout to redeclared block member
ERROR: 0:20: 'gl_PointSize' : cannot add layout to redeclared block member
ERROR: 0:20: 'gl_PointSize' : cannot add patch to redeclared block member
ERROR: 0:20: 'gl_PointSize' : cannot add patch to redeclared block member
ERROR: 0:25: 'length' : array must be declared with a size before using this method
ERROR: 0:25: 'length' : array must be declared with a size before using this method
...
@@ -8,7 +9,9 @@ ERROR: 0:36: 'length' : array must be declared with a size before using this me
...
@@ -8,7 +9,9 @@ ERROR: 0:36: 'length' : array must be declared with a size before using this me
ERROR: 0:40: 'triangles' : inconsistent input primitive for array size colorBad
ERROR: 0:40: 'triangles' : inconsistent input primitive for array size colorBad
ERROR: 0:44: 'triangles' : inconsistent input primitive for array size colorbad2
ERROR: 0:44: 'triangles' : inconsistent input primitive for array size colorbad2
ERROR: 0:56: 'location' : repeated use of location 4
ERROR: 0:56: 'location' : repeated use of location 4
ERROR: 8 compilation errors. No code generated.
ERROR: 0:58: 'patch' : not supported in this stage: geometry
ERROR: 0:59: 'patch' : not supported in this stage: geometry
ERROR: 11 compilation errors. No code generated.
invocations = 4
invocations = 4
...
@@ -72,6 +75,8 @@ ERROR: node is still EOpNull!
...
@@ -72,6 +75,8 @@ ERROR: node is still EOpNull!
0:? 'cva' (layout(location=4 ) in 3-element array of 4-component vector of float)
0:? 'cva' (layout(location=4 ) in 3-element array of 4-component vector of float)
0:? 'cvb' (layout(location=5 ) in 3-element array of 4-component vector of float)
0:? 'cvb' (layout(location=5 ) in 3-element array of 4-component vector of float)
0:? 'cmc' (layout(location=2 ) in 3-element array of 3X3 matrix of float)
0:? 'cmc' (layout(location=2 ) in 3-element array of 3X3 matrix of float)
0:? 'patchIn' (patch in 4-component vector of float)
0:? 'patchOut' (layout(stream=0 ) patch out 4-component vector of float)
Linked geometry stage:
Linked geometry stage:
...
...
Test/baseResults/400.tesc.out
View file @
116c30b6
...
@@ -4,111 +4,114 @@ ERROR: 0:4: 'length' : array must be declared with a size before using this met
...
@@ -4,111 +4,114 @@ ERROR: 0:4: 'length' : array must be declared with a size before using this met
ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 4 compilation errors. No code generated.
ERROR: 0:10: 'patch' : can only use on output in tessellation-control shader
ERROR: 5 compilation errors. No code generated.
vertices = 4
vertices = 4
ERROR: node is still EOpNull!
ERROR: node is still EOpNull!
0:11 Function Definition: main( (void)
0:13 Function Definition: main( (void)
0:11 Function Parameters:
0:13 Function Parameters:
0:13 Sequence
0:15 Sequence
0:13 Barrier (void)
0:15 Barrier (void)
0:15 Sequence
0:17 Sequence
0:15 move second child to first child (int)
0:17 move second child to first child (int)
0:15 'a' (int)
0:17 'a' (int)
0:15 Constant:
0:17 Constant:
0:15 5392 (const int)
0:17 5392 (const int)
0:21 Sequence
0:21 move second child to first child (4-component vector of float)
0:21 'p' (4-component vector of float)
0:21 gl_Position: direct index for structure (4-component vector of float)
0:21 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:21 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:21 Constant:
0:21 1 (const int)
0:21 Constant:
0:21 0 (const int)
0:22 Sequence
0:22 move second child to first child (float)
0:22 'ps' (float)
0:22 gl_PointSize: direct index for structure (float)
0:22 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:22 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:22 Constant:
0:22 1 (const int)
0:22 Constant:
0:22 1 (const int)
0:23 Sequence
0:23 Sequence
0:23 move second child to first child (float)
0:23 move second child to first child (4-component vector of float)
0:23 'cd' (float)
0:23 'p' (4-component vector of float)
0:23 direct index (float)
0:23 gl_Position: direct index for structure (4-component vector of float)
0:23 gl_ClipDistance: direct index for structure (unsized array of float)
0:23 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:23 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:23 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:23 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:23 Constant:
0:23 1 (const int)
0:23 Constant:
0:23 Constant:
0:23
2
(const int)
0:23
1
(const int)
0:23 Constant:
0:23 Constant:
0:23 2 (const int)
0:23 0 (const int)
0:24 Sequence
0:24 move second child to first child (float)
0:24 'ps' (float)
0:24 gl_PointSize: direct index for structure (float)
0:24 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:24 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:24 Constant:
0:24 1 (const int)
0:24 Constant:
0:24 1 (const int)
0:25 Sequence
0:25 Sequence
0:25 move second child to first child (int)
0:25 move second child to first child (float)
0:25 'pvi' (int)
0:25 'cd' (float)
0:25 'gl_PatchVerticesIn' (in int)
0:25 direct index (float)
0:26 Sequence
0:25 gl_ClipDistance: direct index for structure (unsized array of float)
0:26 move second child to first child (int)
0:25 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:26 'pid' (int)
0:25 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:26 'gl_PrimitiveID' (in int)
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
0:25 2 (const int)
0:25 Constant:
0:25 2 (const int)
0:27 Sequence
0:27 Sequence
0:27 move second child to first child (int)
0:27 move second child to first child (int)
0:27 'iid' (int)
0:27 'pvi' (int)
0:27 'gl_InvocationID' (in int)
0:27 'gl_PatchVerticesIn' (in int)
0:29 move second child to first child (4-component vector of float)
0:28 Sequence
0:29 gl_Position: direct index for structure (4-component vector of float)
0:28 move second child to first child (int)
0:29 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:28 'pid' (int)
0:29 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:28 'gl_PrimitiveID' (in int)
0:29 Constant:
0:29 Sequence
0:29 1 (const int)
0:29 move second child to first child (int)
0:29 Constant:
0:29 'iid' (int)
0:29 0 (const int)
0:29 'gl_InvocationID' (in int)
0:29 'p' (4-component vector of float)
0:31 move second child to first child (4-component vector of float)
0:30 move second child to first child (float)
0:31 gl_Position: direct index for structure (4-component vector of float)
0:30 gl_PointSize: direct index for structure (float)
0:31 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:30 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:30 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:30 Constant:
0:30 1 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 'ps' (float)
0:31 move second child to first child (float)
0:31 direct index (float)
0:31 gl_ClipDistance: direct index for structure (unsized array of float)
0:31 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 Constant:
0:31
2
(const int)
0:31
1
(const int)
0:31 Constant:
0:31 Constant:
0:31 1 (const int)
0:31 0 (const int)
0:31 'cd' (float)
0:31 'p' (4-component vector of float)
0:32 move second child to first child (float)
0:32 gl_PointSize: direct index for structure (float)
0:32 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 Constant:
0:32 1 (const int)
0:32 Constant:
0:32 1 (const int)
0:32 'ps' (float)
0:33 move second child to first child (float)
0:33 move second child to first child (float)
0:33 direct index (patch float)
0:33 direct index (float)
0:33 'gl_TessLevelOuter' (patch out 4-element array of float)
0:33 gl_ClipDistance: direct index for structure (unsized array of float)
0:33 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 Constant:
0:33 1 (const int)
0:33 Constant:
0:33 2 (const int)
0:33 Constant:
0:33 Constant:
0:33 3 (const int)
0:33 1 (const int)
0:33 Constant:
0:33 'cd' (float)
0:33 3.200000
0:35 move second child to first child (float)
0:34 move second child to first child (float)
0:35 direct index (patch float)
0:34 direct index (patch float)
0:35 'gl_TessLevelOuter' (patch out 4-element array of float)
0:34 'gl_TessLevelInner' (patch out 2-element array of float)
0:35 Constant:
0:34 Constant:
0:35 3 (const int)
0:34 1 (const int)
0:35 Constant:
0:34 Constant:
0:35 3.200000
0:34 1.300000
0:36 move second child to first child (float)
0:36 direct index (patch float)
0:36 'gl_TessLevelInner' (patch out 2-element array of float)
0:36 Constant:
0:36 1 (const int)
0:36 Constant:
0:36 1.300000
0:? Linker Objects
0:? Linker Objects
0:? 'outa' (1-element array of int)
0:? 'outa' (1-element array of int)
0:? 'patchIn' (patch in 4-component vector of float)
0:? 'patchOut' (patch out 4-component vector of float)
0:? 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:? 'gl_out' (out unsized array of block{gl_Position,gl_PointSize,gl_ClipDistance})
...
...
Test/baseResults/400.tese.out
View file @
116c30b6
...
@@ -6,8 +6,13 @@ ERROR: 0:6: 'isolines' : cannot change previously set input primitive
...
@@ -6,8 +6,13 @@ ERROR: 0:6: 'isolines' : cannot change previously set input primitive
ERROR: 0:9: 'ccw' : cannot change previously set vertex order
ERROR: 0:9: 'ccw' : cannot change previously set vertex order
ERROR: 0:12: 'equal_spacing' : cannot change previously set vertex spacing
ERROR: 0:12: 'equal_spacing' : cannot change previously set vertex spacing
ERROR: 0:13: 'fractional_even_spacing' : cannot change previously set vertex spacing
ERROR: 0:13: 'fractional_even_spacing' : cannot change previously set vertex spacing
ERROR: 0:19: 'barrier' : no matching overloaded function found
ERROR: 0:18: 'patch' : can only use on input in tessellation-evaluation shader
ERROR: 7 compilation errors. No code generated.
ERROR: 0:22: 'barrier' : no matching overloaded function found
ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
ERROR: 12 compilation errors. No code generated.
input primitive = quads
input primitive = quads
...
@@ -15,97 +20,103 @@ vertex spacing = fractional_odd_spacing
...
@@ -15,97 +20,103 @@ vertex spacing = fractional_odd_spacing
triangle order = cw
triangle order = cw
using point mode
using point mode
ERROR: node is still EOpNull!
ERROR: node is still EOpNull!
0:17 Function Definition: main( (void)
0:20 Function Definition: main( (void)
0:17 Function Parameters:
0:20 Function Parameters:
0:19 Sequence
0:22 Sequence
0:19 Constant:
0:22 Constant:
0:19 0.000000
0:22 0.000000
0:21 Sequence
0:24 Sequence
0:21 move second child to first child (int)
0:24 move second child to first child (int)
0:21 'a' (int)
0:24 'a' (int)
0:21 Constant:
0:24 Constant:
0:21 1512 (const int)
0:24 1512 (const int)
0:29 Sequence
0:32 Sequence
0:29 move second child to first child (4-component vector of float)
0:32 move second child to first child (4-component vector of float)
0:29 'p' (4-component vector of float)
0:32 'p' (4-component vector of float)
0:29 gl_Position: direct index for structure (4-component vector of float)
0:32 gl_Position: direct index for structure (4-component vector of float)
0:29 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:29 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:29 Constant:
0:32 Constant:
0:29 1 (const int)
0:32 1 (const int)
0:29 Constant:
0:32 Constant:
0:29 0 (const int)
0:32 0 (const int)
0:30 Sequence
0:30 move second child to first child (float)
0:30 'ps' (float)
0:30 gl_PointSize: direct index for structure (float)
0:30 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:30 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:30 Constant:
0:30 1 (const int)
0:30 Constant:
0:30 1 (const int)
0:31 Sequence
0:31 move second child to first child (float)
0:31 'cd' (float)
0:31 direct index (float)
0:31 gl_ClipDistance: direct index for structure (unsized array of float)
0:31 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 Constant:
0:31 2 (const int)
0:33 Sequence
0:33 Sequence
0:33 move second child to first child (int)
0:33 move second child to first child (float)
0:33 'pvi' (int)
0:33 'ps' (float)
0:33 'gl_PatchVerticesIn' (in int)
0:33 gl_PointSize: direct index for structure (float)
0:33 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 Constant:
0:33 1 (const int)
0:33 Constant:
0:33 1 (const int)
0:34 Sequence
0:34 Sequence
0:34 move second child to first child (int)
0:34 move second child to first child (float)
0:34 'pid' (int)
0:34 'cd' (float)
0:34 'gl_PrimitiveID' (in int)
0:34 direct index (float)
0:35 Sequence
0:34 gl_ClipDistance: direct index for structure (unsized array of float)
0:35 move second child to first child (3-component vector of float)
0:34 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:35 'tc' (3-component vector of float)
0:34 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:35 'gl_TessCoord' (in 3-component vector of float)
0:34 Constant:
0:34 1 (const int)
0:34 Constant:
0:34 2 (const int)
0:34 Constant:
0:34 2 (const int)
0:36 Sequence
0:36 Sequence
0:36 move second child to first child (float)
0:36 move second child to first child (int)
0:36 'tlo' (float)
0:36 'pvi' (int)
0:36 direct index (patch float)
0:36 'gl_PatchVerticesIn' (in int)
0:36 'gl_TessLevelOuter' (patch in 4-element array of float)
0:36 Constant:
0:36 3 (const int)
0:37 Sequence
0:37 Sequence
0:37 move second child to first child (float)
0:37 move second child to first child (int)
0:37 'tli' (float)
0:37 'pid' (int)
0:37 direct index (patch float)
0:37 'gl_PrimitiveID' (in int)
0:37 'gl_TessLevelInner' (patch in 2-element array of float)
0:38 Sequence
0:37 Constant:
0:38 move second child to first child (3-component vector of float)
0:37 1 (const int)
0:38 'tc' (3-component vector of float)
0:39 move second child to first child (4-component vector of float)
0:38 'gl_TessCoord' (in 3-component vector of float)
0:39 gl_Position: direct index for structure (gl_Position 4-component vector of float)
0:39 Sequence
0:39 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:39 move second child to first child (float)
0:39 Constant:
0:39 'tlo' (float)
0:39 0 (const uint)
0:39 direct index (patch float)
0:39 'p' (4-component vector of float)
0:39 'gl_TessLevelOuter' (patch in 4-element array of float)
0:40 move second child to first child (float)
0:39 Constant:
0:40 gl_PointSize: direct index for structure (gl_PointSize float)
0:39 3 (const int)
0:40 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:40 Sequence
0:40 Constant:
0:40 move second child to first child (float)
0:40 1 (const uint)
0:40 'tli' (float)
0:40 'ps' (float)
0:40 direct index (patch float)
0:41 move second child to first child (float)
0:40 'gl_TessLevelInner' (patch in 2-element array of float)
0:41 direct index (float)
0:40 Constant:
0:41 gl_ClipDistance: direct index for structure (unsized array of float)
0:40 1 (const int)
0:41 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:42 move second child to first child (4-component vector of float)
0:41 Constant:
0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float)
0:41 2 (const uint)
0:42 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:41 Constant:
0:42 Constant:
0:41 2 (const int)
0:42 0 (const uint)
0:41 'cd' (float)
0:42 'p' (4-component vector of float)
0:43 move second child to first child (float)
0:43 gl_PointSize: direct index for structure (gl_PointSize float)
0:43 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:43 Constant:
0:43 1 (const uint)
0:43 'ps' (float)
0:44 move second child to first child (float)
0:44 direct index (float)
0:44 gl_ClipDistance: direct index for structure (unsized array of float)
0:44 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:44 Constant:
0:44 2 (const uint)
0:44 Constant:
0:44 2 (const int)
0:44 'cd' (float)
0:? Linker Objects
0:? Linker Objects
0:? 'patchIn' (patch in 4-component vector of float)
0:? 'patchOut' (patch out 4-component vector of float)
0:? 'badp1' (smooth patch in 4-component vector of float)
0:? 'badp2' (flat patch in 4-component vector of float)
0:? 'badp3' (noperspective patch in 4-component vector of float)
0:? 'badp4' (patch sample in 3-component vector of float)
Linked tessellation evaluation stage:
Linked tessellation evaluation stage:
...
...
Test/baseResults/420.vert.out
View file @
116c30b6
...
@@ -28,7 +28,10 @@ ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier
...
@@ -28,7 +28,10 @@ ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier
ERROR: 0:71: 'binding' : binding is too large
ERROR: 0:71: 'binding' : binding is too large
ERROR: 0:74: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits
ERROR: 0:74: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits
ERROR: 0:76: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits (using array)
ERROR: 0:76: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits (using array)
ERROR: 27 compilation errors. No code generated.
ERROR: 0:85: 'patch' : not supported in this stage: vertex
ERROR: 0:85: '' : vertex input cannot be further qualified
ERROR: 0:86: 'patch' : not supported in this stage: vertex
ERROR: 30 compilation errors. No code generated.
ERROR: node is still EOpNull!
ERROR: node is still EOpNull!
...
@@ -131,6 +134,8 @@ ERROR: node is still EOpNull!
...
@@ -131,6 +134,8 @@ ERROR: node is still EOpNull!
0:? 'sampb4' (layout(binding=31 ) uniform sampler2D)
0:? 'sampb4' (layout(binding=31 ) uniform sampler2D)
0:? 'sampb5' (layout(binding=79 ) uniform 2-element array of sampler2D)
0:? 'sampb5' (layout(binding=79 ) uniform 2-element array of sampler2D)
0:? '__anon__3' (out block{gl_ClipDistance,})
0:? '__anon__3' (out block{gl_ClipDistance,})
0:? 'patchIn' (patch in 4-component vector of float)
0:? 'patchOut' (smooth patch out 4-component vector of float)
0:? 'gl_VertexID' (gl_VertexId int)
0:? 'gl_VertexID' (gl_VertexId int)
0:? 'gl_InstanceID' (gl_InstanceId int)
0:? 'gl_InstanceID' (gl_InstanceId int)
...
...
glslang/Include/Types.h
View file @
116c30b6
...
@@ -245,7 +245,7 @@ public:
...
@@ -245,7 +245,7 @@ public:
smooth
=
false
;
smooth
=
false
;
flat
=
false
;
flat
=
false
;
nopersp
=
false
;
nopersp
=
false
;
patch
=
false
;
// TODO 4.0 tessellation: implement semantics of patch (all of 4.3 stuff...), including arrayed inputs
patch
=
false
;
sample
=
false
;
sample
=
false
;
shared
=
false
;
shared
=
false
;
coherent
=
false
;
coherent
=
false
;
...
...
glslang/Include/revision.h
View file @
116c30b6
...
@@ -9,5 +9,5 @@
...
@@ -9,5 +9,5 @@
// source have to figure out how to create revision.h just to get a build
// source have to figure out how to create revision.h just to get a build
// going. However, if it is not updated, it can be a version behind.
// going. However, if it is not updated, it can be a version behind.
#define GLSLANG_REVISION "244
68
"
#define GLSLANG_REVISION "244
80
"
#define GLSLANG_DATE "2013/12/11 1
1:57:40
"
#define GLSLANG_DATE "2013/12/11 1
5:38:19
"
glslang/MachineIndependent/ParseHelper.cpp
View file @
116c30b6
...
@@ -1638,41 +1638,6 @@ void TParseContext::globalQualifierCheck(TSourceLoc loc, const TQualifier& quali
...
@@ -1638,41 +1638,6 @@ void TParseContext::globalQualifierCheck(TSourceLoc loc, const TQualifier& quali
return
;
return
;
}
}
if
(
language
==
EShLangVertex
&&
qualifier
.
storage
==
EvqVaryingIn
)
{
if
(
publicType
.
basicType
==
EbtStruct
)
{
error
(
loc
,
"cannot be a structure or array"
,
GetStorageQualifierString
(
qualifier
.
storage
),
""
);
return
;
}
if
(
publicType
.
arraySizes
)
{
requireProfile
(
loc
,
~
EEsProfile
,
"vertex input arrays"
);
profileRequires
(
loc
,
ENoProfile
,
150
,
0
,
"vertex input arrays"
);
}
}
if
(
language
==
EShLangFragment
&&
qualifier
.
storage
==
EvqVaryingOut
)
{
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"fragment shader output"
);
if
(
publicType
.
basicType
==
EbtStruct
)
{
error
(
loc
,
"cannot be a structure"
,
GetStorageQualifierString
(
qualifier
.
storage
),
""
);
return
;
}
}
if
(
language
==
EShLangVertex
&&
qualifier
.
storage
==
EvqVaryingOut
)
{
if
(
publicType
.
userDef
)
{
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"vertex-shader struct output"
);
profileRequires
(
loc
,
~
EEsProfile
,
150
,
0
,
"vertex-shader struct output"
);
}
}
if
(
language
==
EShLangFragment
&&
qualifier
.
storage
==
EvqVaryingIn
)
{
if
(
publicType
.
userDef
)
{
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"fragment-shader struct input"
);
profileRequires
(
loc
,
~
EEsProfile
,
150
,
0
,
"fragment-shader struct input"
);
}
}
if
(
publicType
.
basicType
==
EbtInt
||
publicType
.
basicType
==
EbtUint
||
publicType
.
basicType
==
EbtDouble
)
{
if
(
publicType
.
basicType
==
EbtInt
||
publicType
.
basicType
==
EbtUint
||
publicType
.
basicType
==
EbtDouble
)
{
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"shader input/output"
);
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"shader input/output"
);
if
(
!
qualifier
.
flat
)
{
if
(
!
qualifier
.
flat
)
{
...
@@ -1683,9 +1648,85 @@ void TParseContext::globalQualifierCheck(TSourceLoc loc, const TQualifier& quali
...
@@ -1683,9 +1648,85 @@ void TParseContext::globalQualifierCheck(TSourceLoc loc, const TQualifier& quali
}
}
}
}
if
(
language
==
EShLangVertex
&&
qualifier
.
storage
==
EvqVaryingIn
&&
if
(
qualifier
.
patch
&&
qualifier
.
isInterpolation
())
(
qualifier
.
isAuxiliary
()
||
qualifier
.
isInterpolation
()
||
qualifier
.
isMemory
()
||
qualifier
.
invariant
))
error
(
loc
,
"cannot use interpolation qualifiers with patch"
,
"patch"
,
""
);
error
(
loc
,
"vertex input cannot be further qualified"
,
""
,
""
);
if
(
qualifier
.
storage
==
EvqVaryingIn
)
{
switch
(
language
)
{
case
EShLangVertex
:
if
(
publicType
.
basicType
==
EbtStruct
)
{
error
(
loc
,
"cannot be a structure or array"
,
GetStorageQualifierString
(
qualifier
.
storage
),
""
);
return
;
}
if
(
publicType
.
arraySizes
)
{
requireProfile
(
loc
,
~
EEsProfile
,
"vertex input arrays"
);
profileRequires
(
loc
,
ENoProfile
,
150
,
0
,
"vertex input arrays"
);
}
if
(
qualifier
.
isAuxiliary
()
||
qualifier
.
isInterpolation
()
||
qualifier
.
isMemory
()
||
qualifier
.
invariant
)
error
(
loc
,
"vertex input cannot be further qualified"
,
""
,
""
);
break
;
case
EShLangTessControl
:
if
(
qualifier
.
patch
)
error
(
loc
,
"can only use on output in tessellation-control shader"
,
"patch"
,
""
);
break
;
case
EShLangTessEvaluation
:
break
;
case
EShLangGeometry
:
break
;
case
EShLangFragment
:
if
(
publicType
.
userDef
)
{
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"fragment-shader struct input"
);
profileRequires
(
loc
,
~
EEsProfile
,
150
,
0
,
"fragment-shader struct input"
);
}
break
;
case
EShLangCompute
:
break
;
default
:
break
;
}
}
else
{
// qualifier.storage == EvqVaryingOut
switch
(
language
)
{
case
EShLangVertex
:
if
(
publicType
.
userDef
)
{
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"vertex-shader struct output"
);
profileRequires
(
loc
,
~
EEsProfile
,
150
,
0
,
"vertex-shader struct output"
);
}
break
;
case
EShLangTessControl
:
break
;
case
EShLangTessEvaluation
:
if
(
qualifier
.
patch
)
error
(
loc
,
"can only use on input in tessellation-evaluation shader"
,
"patch"
,
""
);
break
;
case
EShLangGeometry
:
break
;
case
EShLangFragment
:
profileRequires
(
loc
,
EEsProfile
,
300
,
0
,
"fragment shader output"
);
if
(
publicType
.
basicType
==
EbtStruct
)
{
error
(
loc
,
"cannot be a structure"
,
GetStorageQualifierString
(
qualifier
.
storage
),
""
);
return
;
}
break
;
case
EShLangCompute
:
break
;
default
:
break
;
}
}
}
}
//
//
...
...
glslang/MachineIndependent/glslang.y
View file @
116c30b6
...
@@ -1228,6 +1228,8 @@ storage_qualifier
...
@@ -1228,6 +1228,8 @@ storage_qualifier
}
}
| PATCH {
| PATCH {
parseContext.globalCheck($1.loc, "patch");
parseContext.globalCheck($1.loc, "patch");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
parseContext.profileRequires($1.loc, ~EEsProfile, 400, 1, &GL_ARB_tessellation_shader, "patch");
$$.init($1.loc);
$$.init($1.loc);
$$.qualifier.patch = true;
$$.qualifier.patch = true;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment