John Kessenich
44b807e1d0
GL_ARB_enhanced_layouts, part 3: Semantics for xfb_*: where they can go, inheritance, etc., but not yet the backing arithmetic for offsets and strides.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24916 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-21 04:43:23 +00:00
John Kessenich
281958c21a
Fix g++ warning and update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24741 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-11 20:35:26 +00:00
John Kessenich
a9819921b3
Improvement to the AST traversal infrastructure.
...
Note: This affects any downstream consumers of glslang's traverser. Let me know if there are any issues. Essentially, you will need to change the functions that were pointed to into overriding base-class members instead. See the examples in this check in.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24740 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-11 19:29:55 +00:00
John Kessenich
4f9aebf659
update Makefile dependencies
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24738 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-10 21:25:05 +00:00
John Kessenich
3cdc47bf0b
Several miscellaneous portability improvements (no functional changes).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24737 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-10 21:09:51 +00:00
John Kessenich
68546c6ca4
GL_ARB_enhanced_layouts, part 2: Full implementation of location/component, plus the parsing for xfb* and align/offset (but not yet full semantics for align/offset).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24692 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-08 23:25:18 +00:00
John Kessenich
b76d6d6496
GL_ARB_enhanced_layouts, part 1: Track whether constants are literals, to enable version-specific checking of layout(... = literal) vs. layout(... = expression).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24675 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-07 18:14:48 +00:00
John Kessenich
5053a39578
Fix slight inconsistencies in which qualifiers are inherited into block members:
...
- don't inherit 'binding'
- always set the member storage qualifier, not just when the shader explicitly set it
- don't include in/out members as objects that are resized by geometry/primitive layout specifiers
As a side effect, this makes built-in redeclarations (like gl_ClipDistance) require in/out.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24674 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-07 17:44:41 +00:00
John Kessenich
7cbfdf4394
Minor infrastructure changes, to simplify an upcoming check in:
...
- print out block member types when printing a block (makes all test results change)
- const versions of all intermediate.h type-identification methods
- layoutSlotLocation -> layoutLocation
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24664 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-06 21:27:56 +00:00
John Kessenich
7054075804
Tests: add a few more test cases.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24635 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-31 23:02:24 +00:00
John Kessenich
a70031a696
update linux binary
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24630 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-31 00:16:26 +00:00
John Kessenich
99b0ffd468
Properly handle 'default' nested in flow control, as well as default/case outside switch statements.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24629 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-31 00:13:26 +00:00
John Kessenich
ddbe0befd7
Update windows binaries.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24628 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-30 20:44:49 +00:00
John Kessenich
bd306b89a4
fix g++ complaint and update binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24627 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-30 20:40:03 +00:00
John Kessenich
fcb4ed054c
Preprocessor: Rationalize, simplify, and correct the stack of input sources and their tokenization. This included
...
- consistently dealing with EOF and its effect on error recovery (bug 11444, #1 )
- turning a simulated OO hierarchy of function pointers and typecasting into a real C++ class hierarchy
- correctly handling '\' everywhere, in all classes of tokens, as a layer before preprocessing itself
- conditionally handling '\n' in macro expansion input, depending on whether it is in a macro expression or not
- delete some unused "memory cleanup" code
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24626 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-30 20:34:28 +00:00
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