John Kessenich
7fc3669195
Preprocessor: Add short-circuit logic so ES errors are not given on undefined variables that are short circuited in && and || preprocessing expressions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24390 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 18:19:22 +00:00
John Kessenich
e28beee891
Preprocessor: Fixed that some comments incorrectly substituted a new line instead of space. Also generally cleaned up the space-related coding.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24387 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 16:13:47 +00:00
John Kessenich
8e789e8d62
Fixed a couple places that missed the error check for #else/#elif after #else.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24378 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-05 21:51:40 +00:00
John Kessenich
521ca375e0
Remove one layer of arrayness on geometry shader inputs before checking for location overlaps. I think there is a spec. bug here.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24377 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-05 20:58:16 +00:00
John Kessenich
0b39137009
Implement location overlap error checking.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24376 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-05 20:07:56 +00:00
John Kessenich
2f15597a7e
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24357 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:51:22 +00:00
John Kessenich
38ae7be872
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24356 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:50:38 +00:00
John Kessenich
7fd9e1189b
Track the flow-control (and {}) nesting level to prevent case statements from being a different nesting level than their switch statement.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24355 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:48:20 +00:00
John Kessenich
3a53006e0e
Check for packing qualifiers on block members.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24353 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 21:01:32 +00:00
John Kessenich
afda2411c0
Check for structures out from vertex or into fragment for ES 100 or desktop pre-150.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24349 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 20:41:33 +00:00
John Kessenich
66cdf36521
Detect and give error on second occurrence of #version.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24347 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 20:08:16 +00:00
John Kessenich
ef9c8ab207
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24344 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 19:47:13 +00:00
John Kessenich
e644daf0ed
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24343 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 19:46:19 +00:00
John Kessenich
b88c60b03f
Track whether function declarations are prototypes, and only allow at most one prototype for ES 100.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24342 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 19:43:05 +00:00
John Kessenich
e1f0f5b31f
Re-allow non-language characters in ES 100 comments, including '\', except for '\' just before a new line.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24331 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 17:23:03 +00:00
John Kessenich
34bd4fbef7
Fix ES unsized-array checking: it was one level too low, disallowing some unsized syntax that is legal.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24330 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 16:43:00 +00:00
John Kessenich
d4042f1827
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24316 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:49:23 +00:00
John Kessenich
bc91f48e26
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24315 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:47:57 +00:00
John Kessenich
319de233dc
Add a versioning system and tie it to the -v command-line option. System is described in glslang/Include/revision.template.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24314 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:43:40 +00:00
John Kessenich
44222f90af
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24304 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 21:05:59 +00:00
John Kessenich
6ec8f28960
Update test results.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24303 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 21:05:07 +00:00
John Kessenich
143c8bf10f
Give error when overloaded functions differ only on a parameter's precision qualifier.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24302 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 21:04:03 +00:00
John Kessenich
4e734dd68b
Disallow non-language characters in comments for ES version 100.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24301 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 20:09:57 +00:00
John Kessenich
1abc4045ce
Add #line functionality to allow expressions instead of just literals. Also made some preprocessor code slightly more clear.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24294 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 17:19:03 +00:00
John Kessenich
b06c378cc9
Non-functional: missing test result and slight coding change from yesterday's constant folding check in.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24293 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 16:13:22 +00:00
John Kessenich
a4ca22ff1d
Finish compile-time constant folding for multi-argument built-ins: distance(), dot(), cross(), faceforward(), reflect(), refract(), and outerProduct().
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24272 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-03 01:18:06 +00:00
John Kessenich
0bd3ab69e2
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24269 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 18:10:10 +00:00
John Kessenich
13221d2f7a
Fix logic error in steering which stages get bias vs. non-bias texturing functions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24268 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 18:09:08 +00:00
John Kessenich
78fe3ace85
Fix crash from attempting ES precision propagation through a constant folded built-in function call when the expression tree has unknown precisions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24267 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 16:38:53 +00:00
John Kessenich
98434bed00
Preprocessor fixes:
...
- Correctly handle non-directive lines starting with "#"
- Correctly ignore unrecognized #pragma
- Partial fix for new lines in the middle of macro invocation
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24266 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-02 15:56:38 +00:00
John Kessenich
3591813a8b
Simplify and rationalize constant folding for dereferences (array, matrix, vector, swizzle, struct).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24259 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-01 23:37:08 +00:00
John Kessenich
1fbaa35ce7
Compile-time check on sampler binding size, link-time merging and checking of bindings.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24218 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-27 02:41:52 +00:00
John Kessenich
474b84bdcf
Fix for glslang_vs2013.vcxproj: One source file was marked as CLInclude instead of CLCompile, which caused link errors.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24209 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-26 13:37:57 +00:00
John Kessenich
d6bef9186b
Correct textureGather*() extension support:
...
- add extension behavior and warning message for partial extension support
- add partial support for gpu_shader5 for textureGather*
- add interactions between texture rectangle and textureGather*
- add checks to distinguish between gpu_shader5 and texture_gather extension feature differences
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24183 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-23 21:10:51 +00:00
John Kessenich
5b9f98854c
Reflection: Eliminate redundant arrayed block entries, and use block name instead of instance name for active uniform enumeration.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24182 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-23 00:44:18 +00:00
John Kessenich
c4a2b94dfa
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24180 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-22 17:54:04 +00:00
John Kessenich
37d080c38a
Add missing non-square matrixCompMult built-in functions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24179 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-22 17:52:58 +00:00
John Kessenich
7c8ca2d529
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24178 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-22 17:32:52 +00:00
John Kessenich
ad43f6f684
Implement GL_EXT_shader_texture_lod.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24177 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-22 17:30:34 +00:00
John Kessenich
04884e42ed
Reflection: Expand out block arrays to N different blocks.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24159 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-21 00:54:57 +00:00
John Kessenich
1d1132d9eb
Add limit checking for constant texture texel offsets and max_vertices.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24158 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-20 23:46:57 +00:00
John Kessenich
1e91f5ee8d
Add link-time checks for max_vertices, input primitive, and output primitive for existence and matching.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24157 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-20 22:16:41 +00:00
John Kessenich
5134b9cf57
Track what ins/outs/uniforms are used, so that errors like "declare after use" or "can't use both XXX and YYY" can be issued. So far, used this for invariant, gl_FragColor et. al., and gl_FragCoord use before redeclaration.
...
Also made all tests in testlist include linker tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24156 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-20 21:12:43 +00:00
John Kessenich
23bcc02a20
Add new convenience pool allocators for arbitrary types, and use them to keep all TSymbol content in the pool, so they don't have to be deleted.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24148 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-20 18:37:12 +00:00
John Kessenich
e1dba1b59f
Fix a preprocessor memory leak by cleaning up some preprocessor memory management.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24125 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-19 20:52:56 +00:00
John Kessenich
43e43ce77a
Reflection: Flesh out expansions of complex aggregates not fully dereferenced, visit all array elements for a variable index, and correct max array index when a later occurrence is larger than an earlier one.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24080 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-15 20:41:31 +00:00
John Kessenich
c17dbd516f
Reflection: Optimize leaf-array sizes for largest index used in a live path.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24073 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-15 05:28:51 +00:00
John Kessenich
12f9221e44
Reflection:
...
- correct block data size
- handle deep dereference chains (block.member.member.member)
- more clear interface argument names
(Still TBD: optimizing array size based on biggest used index and handling variable array index in middle of deep dereference chain)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24072 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-15 01:34:27 +00:00
John Kessenich
c0827e4532
Add VS2013 projects. Also, update VS2010 project to:
...
* Include reflection.cpp/.h
* Adding /d2Zi+ for optimized debugging support
* Added _ALLOW_RUNTIME_LIBRARY_MISMATCH;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_ALLOW_MSC_VER_MISMATCH to suppress some future mismatch errors
* Fixed the 64-bit output directories to have the trailing slash that msbuild really wants
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24065 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-14 16:05:13 +00:00
John Kessenich
3db2966570
Fix for build error in vs2013: #include <algorithm> to get definition of std::min and std::max
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24063 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-14 15:28:57 +00:00