John Kessenich [Mon, 10 Jun 2013 07:36:26 +0000 (07:36 +0000)]
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
John Kessenich [Fri, 7 Jun 2013 19:07:39 +0000 (19:07 +0000)]
Add semantic check for ES variably indexing a uniform block.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21894
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 7 Jun 2013 18:54:19 +0000 (18:54 +0000)]
Add more tests for built-in variables.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21893
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 6 Jun 2013 18:31:21 +0000 (18:31 +0000)]
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
John Kessenich [Mon, 3 Jun 2013 04:15:57 +0000 (04:15 +0000)]
Fix another problem with undefined macros needing to evaluate to 0 within a preprocessor expression, but not outside a preprocessor expression.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21815
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Sun, 2 Jun 2013 22:57:37 +0000 (22:57 +0000)]
The new test that was to have been added with the previous check in.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21814
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 30 May 2013 23:31:38 +0000 (23:31 +0000)]
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
John Kessenich [Thu, 30 May 2013 19:15:35 +0000 (19:15 +0000)]
A bunch of semantic checks were missing for binary arithmetic operations. Refactor the "promote" logic to fix these.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21784
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 29 May 2013 22:40:31 +0000 (22:40 +0000)]
Change warning to error for use of double underscore.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21765
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 28 May 2013 07:29:58 +0000 (07:29 +0000)]
Add missing type check for operands having the same type (after conversion) around the ":" in a "?:" operation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21721
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 17 May 2013 02:51:45 +0000 (02:51 +0000)]
Add precision qualifier propagation for swizzling, texture lookups, built-in funtions mapped to operators, comma op, and more robustly propagate for all binary/unary ops.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21622
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 7 May 2013 23:48:06 +0000 (23:48 +0000)]
Remove too aggressive and redundant lexical keyword check: attribute and varying can always be error checked in the grammar.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21443
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Sun, 5 May 2013 23:46:22 +0000 (23:46 +0000)]
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
John Kessenich [Fri, 26 Apr 2013 09:36:42 +0000 (09:36 +0000)]
Add 3 missing reserved keywords.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21296
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 25 Apr 2013 16:44:03 +0000 (16:44 +0000)]
For all keywords already present, get correct when they could be identifiers, are reserved words, or are keywords, for all versions of ESSL and GLSL.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21282
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 17 Apr 2013 19:34:23 +0000 (19:34 +0000)]
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
John Kessenich [Wed, 17 Apr 2013 05:02:12 +0000 (05:02 +0000)]
Add some more qualifier helper functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21173
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 15 Apr 2013 00:14:34 +0000 (00:14 +0000)]
Fix dependency misspelling that caused unnecessary grammar rebuilds.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21142
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Sun, 14 Apr 2013 19:23:50 +0000 (19:23 +0000)]
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
John Kessenich [Sat, 13 Apr 2013 06:05:31 +0000 (06:05 +0000)]
Force "smooth" interpolation qualification when in a fragment shader.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21140
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 12 Apr 2013 22:57:28 +0000 (22:57 +0000)]
Small tweak to switch statements: use a smaller base class.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21138
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 12 Apr 2013 17:17:07 +0000 (17:17 +0000)]
Update all "TODO", add some comments.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21137
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 12 Apr 2013 16:50:28 +0000 (16:50 +0000)]
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
John Kessenich [Fri, 12 Apr 2013 03:57:02 +0000 (03:57 +0000)]
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
John Kessenich [Thu, 11 Apr 2013 22:38:16 +0000 (22:38 +0000)]
- Temp fix for the GLSL yacc file (linux builds failing).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21130
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 11 Apr 2013 16:31:09 +0000 (16:31 +0000)]
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
John Kessenich [Wed, 10 Apr 2013 23:30:05 +0000 (23:30 +0000)]
Additional layout-related error checking.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21108
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 10 Apr 2013 22:26:56 +0000 (22:26 +0000)]
Implement default layout qualifiers at global and block levels with proper inheritance. Also add more error checking of qualifiers.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21107
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 10 Apr 2013 20:15:16 +0000 (20:15 +0000)]
Add anonymous members as a new symbol table type, so the infrastructure can handle blocks with no names.
Also, add more safety to the types involved regarding copy constructors, operator=, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21106
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 10 Apr 2013 02:28:55 +0000 (02:28 +0000)]
Change TType member from "type" to "basicType". It was very confusing.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21094
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 10 Apr 2013 02:06:46 +0000 (02:06 +0000)]
Add interface blocks as a basic type and handle uniform blocks that have an instance name. Includes handling qualifiers on structure members.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21093
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 9 Apr 2013 01:20:01 +0000 (01:20 +0000)]
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
John Kessenich [Sun, 7 Apr 2013 22:43:16 +0000 (22:43 +0000)]
Put in correct rules for multiple versions of qualification and typing of inputs and outputs. Also, removed EvqAttribute, merging it with EvqVaryingIn.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21064
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Sun, 7 Apr 2013 20:04:12 +0000 (20:04 +0000)]
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
John Kessenich [Sun, 7 Apr 2013 02:10:55 +0000 (02:10 +0000)]
Split out the unary-argument built-in function path from the addUnaryMath() path, allowing the return types to be treated correctly without any special casing. Also, implement the correct precision qualifier propagation rules for built-in functions mapped to operators.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21062
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 5 Apr 2013 04:05:39 +0000 (04:05 +0000)]
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
John Kessenich [Wed, 3 Apr 2013 18:42:43 +0000 (18:42 +0000)]
CPP: Handle the "u" and "U" suffixes for uint literals, and correctly handle underflow/overflow of integer literals.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21033
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 21 Mar 2013 17:33:38 +0000 (17:33 +0000)]
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
John Kessenich [Wed, 13 Mar 2013 01:58:33 +0000 (01:58 +0000)]
Fix release build, it was missing the custom build steps.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20845
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 12 Mar 2013 17:53:55 +0000 (17:53 +0000)]
Add and use ability to tell the backend compiler what version/profile the source shader was.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20840
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 12 Mar 2013 17:52:59 +0000 (17:52 +0000)]
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
John Kessenich [Sat, 9 Mar 2013 19:50:19 +0000 (19:50 +0000)]
Get a clean g++/gcc build. Runs and gets correct results on linux.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20820
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 8 Mar 2013 23:14:42 +0000 (23:14 +0000)]
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
John Kessenich [Fri, 8 Mar 2013 19:26:11 +0000 (19:26 +0000)]
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
John Kessenich [Fri, 8 Mar 2013 18:49:22 +0000 (18:49 +0000)]
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
John Kessenich [Fri, 8 Mar 2013 06:51:50 +0000 (06:51 +0000)]
Upgrade to MSVC 11. Fix pool_allocator a bit.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20811
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 7 Mar 2013 19:22:07 +0000 (19:22 +0000)]
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
John Kessenich [Thu, 7 Mar 2013 01:02:02 +0000 (01:02 +0000)]
Add unsigned ints to constUnions. (Unsigned int support is still partial throughout.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20790
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 4 Mar 2013 23:50:08 +0000 (23:50 +0000)]
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
John Kessenich [Fri, 1 Mar 2013 21:53:13 +0000 (21:53 +0000)]
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
John Kessenich [Thu, 28 Feb 2013 20:49:41 +0000 (20:49 +0000)]
Implement operator-based implicit type conversions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20724
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 27 Feb 2013 19:02:52 +0000 (19:02 +0000)]
Allow gl_FragColor and gl_FragData in non-forward-compatible contexts for non-ES versions 150 - 410. Also add deprecation message for attribute/varying for core profile.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20714
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 26 Feb 2013 19:48:48 +0000 (19:48 +0000)]
Skip dummy unused second component for 1D non-array shadows.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20704
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 26 Feb 2013 19:47:21 +0000 (19:47 +0000)]
Fix checking-in of wrong test files.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20703
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 25 Feb 2013 19:44:56 +0000 (19:44 +0000)]
Implement modern (130 and above) texturing. About 250 functions for 3.0, over 500 for 4.3, created programmatically. Handles all 3.0 functions, almost all 4.3 functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20698
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 22 Feb 2013 19:06:20 +0000 (19:06 +0000)]
Rationalize original texture functions per stage.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20685
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 22 Feb 2013 18:43:31 +0000 (18:43 +0000)]
Rationalize locations of type string methods.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20684
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 21 Feb 2013 17:22:17 +0000 (17:22 +0000)]
Expose the sampler type from a TType, and add a way to rebuild just the sampler type name for messages/annotation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20672
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 21 Feb 2013 02:18:42 +0000 (02:18 +0000)]
Replace flat 110 sampler type space with an orthogonalized 430 sampler type space. Invoke it for all the sampler types in the 4.3 grammar.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20652
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 20 Feb 2013 20:10:07 +0000 (20:10 +0000)]
Make legacy texture prototypes more concise, fix minor bugs needed to support it.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20650
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 20 Feb 2013 19:04:22 +0000 (19:04 +0000)]
Line up version 100 and 110 texture prototypes under correct versions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20649
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 20 Feb 2013 04:42:42 +0000 (04:42 +0000)]
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
John Kessenich [Sun, 17 Feb 2013 06:01:50 +0000 (06:01 +0000)]
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
John Kessenich [Thu, 14 Feb 2013 19:02:23 +0000 (19:02 +0000)]
Improve robustness for symbol downcasts by moving to a "getAs" infrastructure and doing more error checking.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20609
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 13 Feb 2013 17:18:30 +0000 (17:18 +0000)]
CPP: Fix stack of previous nested #if/#else/#endif for whether a #else had been seen, which was sometimes cleared and sometimes not, effected later nested #if/#else/#endif #else checks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20573
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 12 Feb 2013 18:26:15 +0000 (18:26 +0000)]
Add bash script for running through all tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20552
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 12 Feb 2013 08:02:20 +0000 (08:02 +0000)]
Allow GLSL construction of matrix from matrix, starting with version 120, and always for ES shaders.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20544
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 12 Feb 2013 06:53:13 +0000 (06:53 +0000)]
Classify more keywords as to what versions they are identifiers, reserved, or keywords.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20540
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 12 Feb 2013 04:58:22 +0000 (04:58 +0000)]
Pass 2 at building on linux: remove compile errors from the preprocessor.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20539
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 11 Feb 2013 22:36:01 +0000 (22:36 +0000)]
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
John Kessenich [Mon, 11 Feb 2013 00:54:44 +0000 (00:54 +0000)]
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
John Kessenich [Fri, 8 Feb 2013 22:54:14 +0000 (22:54 +0000)]
Add gl_PointCoord.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20510
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 8 Feb 2013 18:56:56 +0000 (18:56 +0000)]
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
John Kessenich [Wed, 6 Feb 2013 23:06:52 +0000 (23:06 +0000)]
Support multiple default versions, to enable ES vs. desktop contexts, for shaders missing a #version statement.
This also moved some parseContext code from the flex file to the proper C++ file.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20501
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 6 Feb 2013 19:46:32 +0000 (19:46 +0000)]
Update copyrights.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20490
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 6 Feb 2013 02:23:47 +0000 (02:23 +0000)]
Fix a preprocessor defect, where nested dead #if-#endif had nesting depth off by one level, turning what should be dead code into live code.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20461
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 6 Feb 2013 00:14:16 +0000 (00:14 +0000)]
Add some CPP tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20457
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 4 Feb 2013 23:54:58 +0000 (23:54 +0000)]
Implement non-square matrices, and make a few type improvements. Cleaned up a few old issues. Added two tests.
Details
- added all the new non-square types
- separated concepts of matrix size and vector size
- removed VS 6.0 comments/workarounds
- removed obsolete concept of matrix fields
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20436
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 31 Jan 2013 22:55:53 +0000 (22:55 +0000)]
Add ability to treat keywords as identifiers in versions that had not yet reserved the keyword.
Used this for precision keywords and double matrix keywords.
Also added a few missing reserved words.
Also removed redundant "syntax error" when there is a parse error.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20423
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Tue, 29 Jan 2013 17:24:14 +0000 (17:24 +0000)]
Have non-ES profiles always use EpqNone (no precision qualifier) rather than using highp. This keeps precision qualifiers out of error messages, IL dumps, etc., and avoids the precision propagation algorithm.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20364
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 28 Jan 2013 23:52:49 +0000 (23:52 +0000)]
Put in basic propagation algorithm for precision qualifiers. Some corner cases are document as TODO.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20360
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 28 Jan 2013 18:28:28 +0000 (18:28 +0000)]
Hard code to ES profile for #version 100.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20334
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Mon, 28 Jan 2013 17:40:21 +0000 (17:40 +0000)]
Add precision.frag test.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20333
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 24 Jan 2013 23:10:51 +0000 (23:10 +0000)]
Implement the full scheme for ES precision qualifiers, generalizing existing storage qualifiers to be able to include multiple independent kinds of qualifiers.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20317
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 24 Jan 2013 22:37:46 +0000 (22:37 +0000)]
Fix: version 100 does not accept the 'es' profile
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20316
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 24 Jan 2013 22:33:43 +0000 (22:33 +0000)]
Non functional: Simplify accesses to the parseContext in the flex file.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20315
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 11 Jan 2013 18:55:57 +0000 (18:55 +0000)]
Update copyrights to 2013 for files with real change in them.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20102
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 11 Jan 2013 18:40:40 +0000 (18:40 +0000)]
Update copyrights to 2013 for files with real change in them.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20101
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 10 Jan 2013 18:20:47 +0000 (18:20 +0000)]
Properly declare versions for precision qualifiers, in/out/attribute/varying.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20083
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 10 Jan 2013 01:47:54 +0000 (01:47 +0000)]
Support in/out for stage inputs/outputs, tied to being desktop version 150 or ES 300.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20077
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Fri, 21 Dec 2012 04:28:05 +0000 (04:28 +0000)]
Fix "forward" -> "faceforward" typo, which had caused the operator for it to not be mapped, and instead passed through as a function call.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20021
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 19 Dec 2012 00:50:42 +0000 (00:50 +0000)]
Bug fix: Make the type of the result of a structure assignment be the type of the structure assigned. That is, the type of the result of the "=" itself, if used in a broader expression. This probably fixes some other subtle problems as well.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20001
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 13 Dec 2012 01:37:04 +0000 (01:37 +0000)]
Add a simple test list for regression testing. A much broader test base is needed, however.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19954
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 13 Dec 2012 00:09:49 +0000 (00:09 +0000)]
Change the core of glslang to be a static library rather than a DLL.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19952
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Thu, 13 Dec 2012 00:05:26 +0000 (00:05 +0000)]
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
John Kessenich [Wed, 12 Dec 2012 22:42:30 +0000 (22:42 +0000)]
Support suffixes for floats and doubles (none were supported in 110).
Add preprocessor support for parsing doubles.
Add double support to the flex stage.
Put in some of the basic double supported needed in the front end.
Add generic support for version numbers in the preprocessor, and the core, compatibility, and es profiles.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19949
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 12 Dec 2012 21:34:14 +0000 (21:34 +0000)]
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
John Kessenich [Wed, 12 Dec 2012 21:26:43 +0000 (21:26 +0000)]
Add arrays of arrays grammar, and adapt existing 1D array semantics to keep working as before.
Also add buffer and shared keywords and grammar, which brings the grammar up to 4.3.
N.B. There is a problem for "shared": it is both a keyword (as a storage qualifier) and an identifier (for layouts).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19947
e7fa87d3-cd2b-0410-9028-
fcbf551c1848
John Kessenich [Wed, 12 Dec 2012 21:23:55 +0000 (21:23 +0000)]
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
John Kessenich [Wed, 12 Dec 2012 21:21:23 +0000 (21:21 +0000)]
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