John Kessenich
08d182470b
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
2013-12-20 18:36:27 +00:00
John Kessenich
e8fe7b81d7
Allow tessellation shaders to work on versions back to 150. Also combined all the tessellation tests into a single run.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24569 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-18 18:47:12 +00:00
John Kessenich
7c908d2543
Additional semantic checking for tessellation shaders and related clean up:
...
- non-arrayed geometry inputs and tessellation-control outputs
- include user blocks in i/o array resizing based on primitive type
- things belonging only to 'in' or 'out' are verified only on 'in' or 'out'
- invocation number changing
- move shader-scoped qualifier checking into its class
- remove an incidental union of two levels of the node hierarchy in the yacc stack
- remove layout(location=) default tracking when setting on a variable
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24551 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-18 03:06:24 +00:00
John Kessenich
76ea74afe0
Update Linux script and binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24531 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-17 00:28:00 +00:00
John Kessenich
bd95819123
1) Allow '\' before a non-newline as a token in the preprocessor, and 2) localize line-continuation to just the pp scanner.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24530 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-16 23:58:15 +00:00
John Kessenich
27151efa71
Tessellation: Smaller changes: Take tessellation control output arrayness into account in location overlap testing, better error message for redeclaring a built-in with size to be unsized.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24522 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-13 19:26:54 +00:00
John Kessenich
f3e2a89452
Tessellation: Implicit array sizing and consistency checking of control-shader output arrays based on layout(vertices=...).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24518 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-13 18:38:43 +00:00
John Kessenich
116c30b6ed
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
2013-12-12 01:25:37 +00:00
John Kessenich
a57a78ed9f
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24481 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-11 22:42:17 +00:00
John Kessenich
3a4687d782
Add missing check that a function call is not using the same name as a variable hiding the function's name. Also, support version 110 separate name spaces for functions and variable names.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24480 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-11 22:38:19 +00:00
John Kessenich
623833fabc
Tessellation partial implementation (not ready for use yet), including:
...
- the built-in constants
- built-in variable declarations, some dependent on gl_MaxPatchVertices
- layout qualifier for vertices (shared with geometry shader max_vertices)
- layout qualifiers for vertex spacing, vertex order, point mode, and primitive type
- link semantics for layout qualifiers
Still TBD:
- patch qualifier and arrayed input handling
- sizing of gl_out[]
- additional semantic checking
- supporting the extension on version 150
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-11 18:57:40 +00:00
John Kessenich
2fcc9ff1d2
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24421 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-10 00:27:59 +00:00
John Kessenich
2d2f31625d
Preprocessor: Implement skipping of macros that evaluate to nothing while evaluating expressions. They had been causing early termination of an expression's evaluation.
...
Also includes some unrelated updates of documentation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24420 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-10 00:25:14 +00:00
John Kessenich
c719481d43
Flesh out 4.x block redeclaration semantics:
...
- hide non-redeclared anonymous members
- array size limit checking
- illegal member qualifiers
- additional members
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24406 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-09 00:37:46 +00:00
John Kessenich
e1b2e39a56
Allow layout aliasing for desktop vertex inputs.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24400 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-07 00:28:07 +00:00
John Kessenich
5f15d4224a
Desktop array size limit checking for gl_ClipDistance[] and gl_TexCoord[].
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24397 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 23:57:42 +00:00
John Kessenich
64bcb105c9
Made '\' at end of C++ comments be a warning. It is line continuation for some versions, but not others.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24396 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 21:45:15 +00:00
John Kessenich
828dc87a7c
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24392 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 18:30:06 +00:00
John Kessenich
3e0efe5981
Fix g++ warnings.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24391 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 18:24:47 +00:00
John Kessenich
7fc3669195
Preprocessor: Add short-circuit logic so ES errors are not given on undefined variables that are short circuited in && and || preprocessing expressions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24390 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 18:19:22 +00:00
John Kessenich
e28beee891
Preprocessor: Fixed that some comments incorrectly substituted a new line instead of space. Also generally cleaned up the space-related coding.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24387 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 16:13:47 +00:00
John Kessenich
8e789e8d62
Fixed a couple places that missed the error check for #else/#elif after #else.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24378 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-05 21:51:40 +00:00
John Kessenich
521ca375e0
Remove one layer of arrayness on geometry shader inputs before checking for location overlaps. I think there is a spec. bug here.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24377 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-05 20:58:16 +00:00
John Kessenich
0b39137009
Implement location overlap error checking.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24376 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-05 20:07:56 +00:00
John Kessenich
2f15597a7e
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24357 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:51:22 +00:00
John Kessenich
38ae7be872
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24356 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:50:38 +00:00
John Kessenich
7fd9e1189b
Track the flow-control (and {}) nesting level to prevent case statements from being a different nesting level than their switch statement.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24355 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:48:20 +00:00
John Kessenich
3a53006e0e
Check for packing qualifiers on block members.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24353 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:01:32 +00:00
John Kessenich
afda2411c0
Check for structures out from vertex or into fragment for ES 100 or desktop pre-150.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24349 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 20:41:33 +00:00
John Kessenich
66cdf36521
Detect and give error on second occurrence of #version.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24347 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 20:08:16 +00:00
John Kessenich
ef9c8ab207
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24344 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 19:47:13 +00:00
John Kessenich
e644daf0ed
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24343 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 19:46:19 +00:00
John Kessenich
b88c60b03f
Track whether function declarations are prototypes, and only allow at most one prototype for ES 100.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24342 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 19:43:05 +00:00
John Kessenich
e1f0f5b31f
Re-allow non-language characters in ES 100 comments, including '\', except for '\' just before a new line.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24331 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 17:23:03 +00:00
John Kessenich
34bd4fbef7
Fix ES unsized-array checking: it was one level too low, disallowing some unsized syntax that is legal.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24330 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 16:43:00 +00:00
John Kessenich
d4042f1827
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24316 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:49:23 +00:00
John Kessenich
bc91f48e26
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24315 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:47:57 +00:00
John Kessenich
319de233dc
Add a versioning system and tie it to the -v command-line option. System is described in glslang/Include/revision.template.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24314 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:43:40 +00:00
John Kessenich
44222f90af
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24304 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 21:05:59 +00:00
John Kessenich
6ec8f28960
Update test results.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24303 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 21:05:07 +00:00
John Kessenich
143c8bf10f
Give error when overloaded functions differ only on a parameter's precision qualifier.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24302 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 21:04:03 +00:00
John Kessenich
4e734dd68b
Disallow non-language characters in comments for ES version 100.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24301 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 20:09:57 +00:00
John Kessenich
1abc4045ce
Add #line functionality to allow expressions instead of just literals. Also made some preprocessor code slightly more clear.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24294 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 17:19:03 +00:00
John Kessenich
b06c378cc9
Non-functional: missing test result and slight coding change from yesterday's constant folding check in.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24293 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 16:13:22 +00:00
John Kessenich
a4ca22ff1d
Finish compile-time constant folding for multi-argument built-ins: distance(), dot(), cross(), faceforward(), reflect(), refract(), and outerProduct().
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24272 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 01:18:06 +00:00
John Kessenich
0bd3ab69e2
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24269 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 18:10:10 +00:00
John Kessenich
13221d2f7a
Fix logic error in steering which stages get bias vs. non-bias texturing functions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24268 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 18:09:08 +00:00
John Kessenich
78fe3ace85
Fix crash from attempting ES precision propagation through a constant folded built-in function call when the expression tree has unknown precisions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24267 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 16:38:53 +00:00
John Kessenich
98434bed00
Preprocessor fixes:
...
- Correctly handle non-directive lines starting with "#"
- Correctly ignore unrecognized #pragma
- Partial fix for new lines in the middle of macro invocation
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24266 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 15:56:38 +00:00
John Kessenich
3591813a8b
Simplify and rationalize constant folding for dereferences (array, matrix, vector, swizzle, struct).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24259 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-01 23:37:08 +00:00