John Kessenich
4c70685382
Memory management hygiene: Use compare() instead of substr(), and put a few more things intrinsically in the memory pool.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23467 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-11 16:28:43 +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
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
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
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
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
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
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
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
John Kessenich
e0ab8db923
Final linux tweak.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22294 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-08 21:50:31 +00:00
John Kessenich
3a05b78826
A few linux improvements/fixes for the previous check in.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22292 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-08 20:51:29 +00:00
John Kessenich
db4cd54dac
Handle bad input file.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22194 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-26 22:42:55 +00:00
John Kessenich
e5f80b8054
Remove the -a option, it doesn't belong here.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22166 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 18:31:47 +00:00
John Kessenich
41cf6b540b
Add scanner that can find '#version' across an array of non-null terminated, length-based, strings. Handle the ES error where #version is not the first thing found, while still supporting desktop behavior, and more generally support length-based multiple strings for a single shader.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22165 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 18:10:05 +00:00
John Kessenich
52ac67e913
Make the PP report an error on undefined macro in "#if ..." for ES profiles, unless relaxed error checking is requested. Still works as normal CPP on non-ES.
...
Also, improved error reporting in general for the PP.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21417 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-05-05 23:46:22 +00:00
John Kessenich
09da79e190
Put memory counter stuff in #ifdef _WIN32.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21181 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-17 19:34:23 +00:00
John Kessenich
8df53cc057
Rationalize command-line options: controlling memory leak testing, AST output, and info log output.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21141 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-14 19:23:50 +00:00
John Kessenich
0108aa1183
Minor changes: remove use of 'auto', plug obscure memory leak, update copyright.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21136 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-12 16:50:28 +00:00
John Kessenich
b51f62c573
Add the GL_ES macro for ES personalities, along with a general mechanism for adding preambles in front of shaders without effecting line numbers, etc.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21122 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-11 16:31:09 +00:00
John Kessenich
d7c120f16f
A few trivial things, including removing '/' as a command line option indicator so absolute paths work naturally.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20839 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-12 17:52:59 +00:00
John Kessenich
cfd643e447
Another round of gcc/g++ fixes.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20819 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 23:14:42 +00:00
John Kessenich
37827023c4
Add warning-suppression flag. Combined with relaxed errors, so an enum can be used instead of many bools.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20818 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 19:26:11 +00:00
John Kessenich
4055816bc9
Add compilation mode flags for forward-compatible contexts and relaxed error checking. These initiate as arguments to ShCompile() and both default to being off.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20817 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 18:49:22 +00:00
John Kessenich
1f2a36bd6b
Add ES 300 matrix operations: outerProduct, determinant, inverse, and transpose, and missing ES 300 limit gl_MaxFragmentInputVectors.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20643 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-20 04:42:42 +00:00
John Kessenich
bd0747d6f0
Built-in symbol tables now lazily evaluated, and driven by per version, per profile input. Got all ES 100 and ES 300 built-in symbols correct.
...
This includes
- doing prescan of shader to know version/profile before parsing it
- putting precision qualifiers on built-in ES symbols
- getting most built-in state correct for core/compatibility/missing profile
- adding gl_VertexID and gl_InstanceID, among other ES 300 built-in symbols
- adding the ES 300 gl_Max/Min constants
- accepting shaders that contain nothing but whitespace without generating an error
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20627 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-17 06:01:50 +00:00
John Kessenich
54d8cda95e
Pass 1 at building on linux: remove compile errors from machine independent.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20536 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-11 22:36:01 +00:00
John Kessenich
dadf945fd7
Simultaneously fix only known memory leak and take the next step in supporting arrays of arrays. Improved several minor things along the way.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20514 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-11 00:54:44 +00:00
John Kessenich
38c507e75a
Make the default version be 100.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20509 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-08 18:56:56 +00:00
John Kessenich
9fd55bd338
Add a new shader-versioning infrastructure capable of handling multiple profiles, desktop/ES, many versions, features coming and going in different versions across different profiles, and extensions.
...
NB: *Use* of this infrastructure is so far only skeletal.
Fixed a few typos and minor issues along the way.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19951 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-13 00:05:26 +00:00
John Kessenich
e95ecc54fa
1) Improve error recovery from arrays sized with a non constant. 2) Add double vectors to the lexer. 3) Default to vertex shaders for unrecognized file name suffixes.
...
Also fix issue where the keyword "shared" conflicts with the layout qualifier identifier "shared" by allowing the keyword in the layout qualifier identifier list.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19948 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:34:14 +00:00
John Kessenich
e320a1854b
Remove the pack/unpack languages and bring grammar up from 1.1 to 4.2 and fix the affected 1.1 productions and semantics to still work correctly for 1.1 shaders.
...
For 4.2, largely, it is only the grammar that is working. Productions and semantics are mostly missing. Lexical analysis is mostly done, but not in the preprocessor, which still can't handle uint and double literals.
The grammar and token names are reorganized to match the specification, to allow easier comparison between the specification and the working grammar.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19946 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:23:55 +00:00
John Kessenich
200b2734d7
Bring up to date with VS 10 express.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19945 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:21:23 +00:00
John Kessenich
a0af473a8b
Create a base GLSL front-end from the 3Dlabs glslang front-end from 20-Sep-2005.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19944 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:15:54 +00:00