Commit Graph

25 Commits

Author SHA1 Message Date
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
John Kessenich
ef8ae2e345 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
2013-02-27 19:02:52 +00:00
John Kessenich
b3338b307f 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
2013-02-26 19:47:21 +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
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
6968b823ef 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
2013-02-08 22:54:14 +00:00
John Kessenich
464f6d9ff1 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
2013-02-06 00:14:16 +00:00
John Kessenich
f0fdc53e2a 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
2013-02-04 23:54:58 +00:00
John Kessenich
868933d668 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
2013-01-28 17:40:21 +00:00
John Kessenich
564842b23b 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
2013-01-10 18:20:47 +00:00
John Kessenich
f59bfa07e0 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
2013-01-10 01:47:54 +00:00
John Kessenich
f20bb0eb94 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
2012-12-13 01:37:04 +00:00