John Kessenich
c777fc2c4c
Scanning: 1) rationalize end-of-input everywhere, 2) prevent infinite loop at end-of-input, 3) use positive chars.
...
Fixes issue #25 . (char 255 aliased to -1 and missing tests for end of input).
1) All layers of input scanning now share a single EndOfInput value.
This avoids translation of it across layers of encapsulation.
2) Some places looking for end of line were not stopping on EndOfInput.
3) Use of "char" for the input made char values > 127 be negative numbers.
This allowed for aliasing of 255 to -1, etc. This is fixed by using
unsigned char.
2015-07-27 09:37:55 -06:00
John Kessenich
6e76bdc88d
glslang front-end: Full turn-on of AEP tessellation semantics.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31538 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-19 23:03:32 +00:00
John Kessenich
2f21fccee9
glslang testing: Remove dependence on testfiles from LunarGLASS.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31512 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-17 16:15:09 +00:00
John Kessenich
453bb26ef5
glslang AEP: The extension scheme, extension-enabled stage-existence testing, and compute-shader interface. Still needs in/out blocks, unsized arrays, etc. before real testing can be done.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31479 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-12 05:01:25 +00:00
John Kessenich
af9ab5f743
glslang parser: Arrays-of-arrays name-mangling and error messages (lots of A-of-A stuff to come a bit later). This patch from Google, David Neto <dneto@google.com>.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31137 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-11 16:16:49 +00:00
John Kessenich
b330d467fc
glslang tests: Correct linux ^M problem in testlist
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31112 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-08 01:21:26 +00:00
John Kessenich
bb8c3de8b3
glslang parser: Fix crash for ES shader with a uniform block with an unsized array that is later accessed. David Neto (dneto@google.com).
...
Instead of crashing, exit early from the implicit-sized-array-size-update routine so we can get to a real error message which is emitted later.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31109 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-08 00:54:34 +00:00
John Kessenich
d1888f83f6
Implement conservative depth layout qualifiers. Based partly on a submission.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27758 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-18 21:27:53 +00:00
John Kessenich
699684180f
Implement cull distances for GLSL 4.5 (but not as an extension yet, just a 4.5 feature).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27714 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 06:37:59 +00:00
John Kessenich
13fd6c9dd7
Implement GL_ARB_derivative_control.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27713 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 04:15:56 +00:00
John Kessenich
4d57090da5
Turn on ESSL 3.1 for most features:
...
- images: load/store, memory qualifiers
- buffer blocks
- compute shaders
- atomic counters
- texture gather
- SSO
- uniform locations
- all the numeric-based version # comparisons
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27710 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-12 22:07:22 +00:00
John Kessenich
bedb1bc2db
Partial implementation of atomic counters.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27701 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-12 03:52:51 +00:00
John Kessenich
2bbd2a3be8
Add missing tests and test results.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26228 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-14 16:10:01 +00:00
John Kessenich
cf0206c341
Restore r26245 and all tests and test results since 4/1:
...
r26245: Remove "not yet complete" warning for versions 130 and 140, after tidying up a bit and adding tests. Token pasting is the only known missing feature, and gives its own message now on use.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-14 15:46:40 +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
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
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
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
69aa9c1b84
Fixes to scanning:
...
- do version checking for the line-continuation character
- check for built-in names in #undef
- bug fix for #elif after #else
- do version checking for use of floating point suffixes (f, LF, etc.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24011 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 03:31:24 +00:00
John Kessenich
8ec55cdcd2
Clean up/resolve a bunch of TODO, which included implementing pixel_center_integer and origin_upper_left and adjusting what versions see legacy texturing names.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23874 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-05 18:07:25 +00:00
John Kessenich
9497485e14
Add geometry shader input array sizing/checking WRT declared input primitive layout.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23698 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-24 22:41:04 +00:00
John Kessenich
c78a126ba6
Tie "location = " to the right stages/versions/extensions. Also add "#define extension 1" extension support and instructions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23633 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-22 00:21:04 +00:00
John Kessenich
fb57e7cc5e
Add ES 3.0 fragment output link-time test for outputs having or not having location qualifiers.
...
Also split linker validation into its own file, removed dead "QualifierAlive" files, printed errors for parsing problems with built-in symbols, updated the Windows binary, and added some tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23490 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-15 21:46:20 +00:00
John Kessenich
3afe67dcc2
Non-functional: Remove use of the unused structure 'remapper', and other minor internal improvements. Triggered by some bigger changes in the works. Also, turned on an existing test that was not included in the test list.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23426 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-09 00:20:26 +00:00
John Kessenich
816e9bc90b
Improve robustness of extension checking, and its intersection with ES 100 features.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23388 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-04 21:09:36 +00:00
John Kessenich
a5830dfc0e
Add the following ESSL 2.0 (#version 100) limitations to the configuration file, internal infrastructure, and test cases. Still need to implement the actual detection of non-inductive loops and array accesses. While and do-while loop detection is done.
...
nonInductiveForLoops
whileLoops
doWhileLoops
generalUniformIndexing
generalAttributeMatrixVectorIndexing
generalVaryingIndexing
generalSamplerIndexing
generalVariableIndexing
generalConstantMatrixVectorIndexing
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23323 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-02 05:10:48 +00:00
John Kessenich
44e8cae80a
Allow ES version 100 to redeclare built-in functions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23322 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-02 01:30:14 +00:00
John Kessenich
9839e2440e
Unify the 8 grammar productions for declaring variables. This greatly simplifies making changes for this set of productions.
...
This change also naturally picks up redeclarations of built-in arrays and the addition of the remaining linker objects of const, arrays, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23246 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-26 00:45:21 +00:00
John Kessenich
f5ebfb5f27
Test for and prevent any dead-code elimination, as all code is needed in the AST for static-use analysis.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23163 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-20 06:20:21 +00:00
John Kessenich
d46b31fdc5
Give new scopes to non-compound (simple) if-then-else substatements, correcting scoping for declarations they contain.
...
Also, updated several tests and the Todo list.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22845 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-27 03:59:04 +00:00
John Kessenich
c027579631
Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
...
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().
Have not added any new built-in variables.
Also changed the linear performance relateToOperator() to a high-performance version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
John Kessenich
4586dbdc1b
Track expected test results and add more README information.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22602 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-05 15:52:03 +00:00
John Kessenich
41a5918eaa
Allow unsigned int in the "location = " grammar, and generally improve recognition of numeric literals to be up to spec.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22597 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-04 23:51:37 +00:00
John Kessenich
d3f85891a7
Support line-continuation (backslash before newline) for tokens and one-line comments in the preprocessor.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22168 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 21:09:47 +00:00
John Kessenich
eebed6f60b
Disallow variable indexing into sampler array for ES and desktop before version 400.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22148 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 21:52:41 +00:00
John Kessenich
01fc0645cb
Add semantic checks for order of qualification and repetition within a class of qualifiers.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22145 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 21:22:03 +00:00
John Kessenich
41a36bbb2f
Track separate precision defaults for each kind of sampler, give initial defaults as per spec. Also make fragment floats have no default. Modify/add tests to adapt to these changes.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22066 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-19 05:41:25 +00:00
John Kessenich
fbe01520b6
Get all the scoping rules right for ES and non ES, name hiding, built-in overriding, etc.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21948 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-12 06:13:17 +00:00
John Kessenich
fddf3ce3a1
Unify constant floats and constant doubles; they can all be constant doubles.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21921 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-10 21:56:23 +00:00
John Kessenich
00f605b930
A round of increasing robustness against buffer overruns.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21917 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-10 07:36:26 +00:00
John Kessenich
0fbb0c4930
Block/structure fixes: Merge qualifiers with multiple declarators, handle arrays of blocks, more semantic checks for what's allowed.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21883 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-06 18:31:21 +00:00
John Kessenich
2327da4784
Add test for operation semantics, fix one bug it found.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21798 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-05-30 23:31:38 +00:00
John Kessenich
0576126005
Add switch/case/default statements, using a switch node that contains a sequence of case/default nodes and top-level nodes of the code chunks in between them.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21131 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-12 03:57:02 +00:00
John Kessenich
e9942d26f5
Initial implementation of layout qualifiers. More to come after uniform blocks are in place.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21078 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-09 01:20:01 +00:00
John Kessenich
ad3663be1f
Add ES 300 built-ins trunc, round, roundEven, modf, isnan, isinf, floatBitsToInt, floatBitsToUint, intBitsToFloat, uintBitsToFloat, packSnorm2x16, unpackSnorm2x16, packUnorm2x16, unpackUnorm2x16, packHalf2x16, and unpackHalf2x16, and new form of min, max, clamp, and mix.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21063 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-07 20:04:12 +00:00
John Kessenich
ebeeece6a7
Add uint type (big change). For both int/uint, add the operators >>, <<, &, |, and ^. Also added unsigned literals and uint precision support. Also fixed how int/uint literal underflow/overflow is handled.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21054 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-05 04:05:39 +00:00
John Kessenich
7d58d655c2
Add a forward reference function call test.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20945 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-21 17:33:38 +00:00
John Kessenich
53fb465729
Change infrastructure to support constant folding across built-in functions, as required by 1.2 semantics. Partially fleshed out with min/max and some trig functions. Still have to complete all operations.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20806 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-07 19:22:07 +00:00
John Kessenich
3252b18590
Minor updates to tests.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20758 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-04 23:50:08 +00:00
John Kessenich
ca8899c9ae
Add productions/data for about 14 qualifiers (versions 1.2 through 4.3). Fixed some case issues for rect/array keywords.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20742 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-01 21:53:13 +00:00