Commit Graph

792 Commits

Author SHA1 Message Date
John Kessenich
941d156c13 Update Windows binary.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23408 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-07 21:54:43 +00:00
John Kessenich
98c2ef25de Non-functional changes: Typo in error message and in comment, remove unneeded arguments, separate constructor-op mapping from handling constructors.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23389 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-05 19:03:50 +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
c6b7e6350b Make ES 100 gl_FragData be a mediump, and fix some warnings from g++.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23380 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-04 03:05:45 +00:00
John Kessenich
e50441ad94 Make some portability improvements identified by Christophe: A few size_t, a couple "../Include", and a whole bunch of parenthesizing "(A && B) || (C && D)", because some compilers don't believe humans know && is higher precedence than ||.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23379 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-04 02:27:06 +00:00
John Kessenich
61c2d1410a Document how to add a new feature enabled by an extension in Versions.cpp. Also reorganized slightly to localize related functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23376 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-03 20:23:57 +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
447fc3613a Add message indicating level of completeness for not-yet-complete versions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23313 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-01 23:13:50 +00:00
John Kessenich
e29e4af7a7 Update Window's binary.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23311 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-01 22:05:18 +00:00
John Kessenich
04750f7948 Update Linux binaries
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23310 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-01 22:04:33 +00:00
John Kessenich
2ecdd14288 Add function recursion testing to the link-time validation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23309 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-01 21:58:43 +00:00
John Kessenich
f2ee3dd46a Add full support for uniforms with initializers, including intra-stage link validation of aggregate constant initializers.
This included 
 - encapsulating aggregate constants
 - removal of constant-aggregate comparison algorithms, instead using a flattened and direct std::vector comparison
 - adding structure type comparison for independently declared structures that still might match types



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23274 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-28 04:02:08 +00:00
John Kessenich
b3345c422d Fix g++ complaint with previous check in.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23247 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-26 00:53:10 +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
337dbc7d8c Add basic intra-stage linking validation for matching types and qualification of uniforms/ins/outs/globals, function body duplication, and mixing ES/non-ES shaders.
Still need to handle arrays and built-in redeclarations, and many more rules, but this puts the basics in place.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23225 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-24 21:18:46 +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
c981efd84d Update Linux binaries
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23109 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-17 22:44:35 +00:00
John Kessenich
efd93d4342 Update the windows executable.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23108 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-17 22:42:02 +00:00
John Kessenich
05a7063007 Add optional configuration file for specifying (existing) limits. Details explained by usage statement. More limits to be added in the future.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23105 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-17 19:26:08 +00:00
John Kessenich
b84b700d90 Basic infrastructure for redeclaring built-in variables (like gl_FragCoord) so shaders can change their type/layout.
A modifiable copy is made at the shader's global scope.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23103 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-17 18:45:24 +00:00
John Kessenich
5f753e0222 Full thread safety working:
- don't use [] for map lookups, it can modify the map
 - copy up built-in symbols out of shared symbol table levels before modifying them
 - enforce shallow vs. deep TType copies
 - combine maxArraySize with the array dimensions vector, encapsulate
 - remove chaining of array types


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22953 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-08 21:04:46 +00:00
John Kessenich
38f3b890de Ensure the shared symbol table levels are read-only to make multi-threading safe. Also removed inadvertent extra copies of the symbol table shared across all stages.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22939 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-06 19:52:57 +00:00
John Kessenich
69f4b517c2 Add link validation infrastructure for multiple compilation units per stage. Includes a new, straightforward, C++ interface to the front end.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22927 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-04 21:19:27 +00:00
John Kessenich
2f1eb37d82 Some rationalization of TIntermediate (to own it's own tree root) and TParseHelper for better encapsulation. Needed by some upcoming intra-stage link validation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22914 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-03 22:57:27 +00:00
John Kessenich
807b8e3b82 Remove TIntermediate's dependency on infoSink, simplify folding of constant aggregates, and infoSink use in constant folding.
Added a few deep aggregate constant folding testing cases.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22912 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-03 22:14:59 +00:00
John Kessenich
fca7534044 Restore TDebugOptions, as code consuming this interface is still using it, even though the front-end proper no longer uses it.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22910 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-03 15:16:03 +00:00
John Kessenich
94a81fbd31 Option rationalization and minor clean up.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22907 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-31 02:41:30 +00:00
John Kessenich
8700e9e6d1 Add more constant folding cases for min, max, step, smoothstep, mix, clamp, atan, and pow.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22903 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-30 00:45:57 +00:00
John Kessenich
b603f918a4 Put all glslang internals (but not the external interface) into the glslang namespace.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22882 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-29 00:39:25 +00:00
John Kessenich
23bdb29eac Move the complex pieces of C++ code from glslang.y to ParseHelper.cpp. Updated some tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22846 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-27 05:57:15 +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
3af0d53dac Remove unnecessary TString constructors.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22844 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-27 03:43:13 +00:00
John Kessenich
a5ea9c63f7 Dynamically allocate symbol table containers, so timing of clean up can be more easily controlled WRT memory pool cleanup.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22681 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-13 00:58:49 +00:00
John Kessenich
99a0576225 Share built-in symbols common to all stages for desktop (but still per profile per version).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22662 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 20:31:43 +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
317f1af217 Update Linux binaries for name-mangling bug fix
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22654 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-08 16:26:36 +00:00
John Kessenich
252b619066 Remove a mangled-name cache in the type that was sometimes stale.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22653 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-08 16:22:54 +00:00
John Kessenich
1b42f2a33d Add parse-time constant folding for isinf() and isnan().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22621 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-06 20:22:51 +00:00
John Kessenich
af262433ab Update Linux binaries
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22605 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-05 17:11:37 +00:00
John Kessenich
acc55c2724 Update the Windows binary.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22604 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-05 17:09:24 +00:00
John Kessenich
8d2fe45334 Linux abs() needs to be fabs(); a few other minor Linux tweaks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22603 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-05 16:36: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
161d482312 Add windows executable.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22595 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-03 00:27:08 +00:00
John Kessenich
b849c1de5c Add Linux executables
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22594 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-03 00:16:49 +00:00
John Kessenich
54f6e5661d Set up infrastructure for installing an executable. Changes the standalone name to glslangValidator.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22593 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-03 00:04:10 +00:00
John Kessenich
53f3cc977d Fix bison file naming issues from upgrading to version 2.7 of bison.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22578 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-01 18:04:50 +00:00
John Kessenich
ee6a9c8ba8 Make previous check in compile correctly on linux.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22568 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-31 23:19:17 +00:00
John Kessenich
2b07c7e70a Improve multi-threading and move Standalone to a multi-threading model (currently off though).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22565 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-31 18:44:13 +00:00