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
John Kessenich
bf63ef05d9
Add GetEsslVersionString() and GetGlslVersionString().
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24054 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-14 00:16:43 +00:00
John Kessenich
e4f45cbf49
fix g++ compilation issues
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24043 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-13 20:50:21 +00:00
John Kessenich
ec252dfd3b
Reflection: Add translation from glslang types to the API #define types.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24042 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-13 19:07:43 +00:00
John Kessenich
568bc3ae55
Reflection: Implement the std140 block offset calculation rules.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24027 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-13 05:40:44 +00:00
John Kessenich
c043498b02
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24024 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 22:05:09 +00:00
John Kessenich
9511ae8d70
Update Window's binary.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24023 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 22:04:23 +00:00
John Kessenich
ffa66d3bc7
Disallow arrays in initializers for non-array-object versions (assignment, etc. were already caught, but not initialization).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24022 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 22:02:36 +00:00
John Kessenich
029d746bad
Fix line-continuation bug.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24021 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 22:01:32 +00:00
John Kessenich
df0488dd0f
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24012 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 03:36:35 +00:00
John Kessenich
69aa9c1b84
Fixes to scanning:
...
- do version checking for the line-continuation character
- check for built-in names in #undef
- bug fix for #elif after #else
- do version checking for use of floating point suffixes (f, LF, etc.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24011 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 03:31:24 +00:00
John Kessenich
67c9f3a720
Misc semantics fixes:
...
- don't allow pre-array object versions to return a struct containing an array
- special case -2147483648 / -1
- include "~" in the full integer functionality checks
- handle multiple function parameters having the same name
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24010 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 01:02:51 +00:00
John Kessenich
09709c1521
Don't allow invariant in a function.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24009 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 23:51:57 +00:00
John Kessenich
e74fe56b02
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24008 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 23:31:44 +00:00
John Kessenich
bd1a5b7727
Add GL_OES_EGL_image_external. Includes new keyword, type, name mangling, built-in function calls, etc.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24007 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 23:29:59 +00:00
John Kessenich
99296369d3
Add GL_EXT_frag_depth.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24003 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 20:51:50 +00:00
John Kessenich
06a37c3964
Add GL_OES_standard_derivatives. Also added extension infrastructure that allows built-in symbols to be tagged with extensions and automatically error checked against them.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24002 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 20:31:45 +00:00
John Kessenich
115a0adc29
Add GL_OES_texture_3D extension. Also, minor tweaks to extension adding infrastructure.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24001 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 18:50:06 +00:00
John Kessenich
df81ce90c3
Update Linux binaries
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23998 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 17:01:55 +00:00
John Kessenich
359326b866
Minor consistency fix: Define built-in functions to have bodies.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23985 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 04:59:32 +00:00
John Kessenich
a4351c55e8
More subtle checking for redeclarations:
...
- 300 doesn't allow built-in overload, while 100 does, while neither allows redefining
- block name can't be reused for block name within the same interface
(though, the spec. isn't clear about that, it's easier than verifying member matches, will file bug on it)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23984 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-11 04:21:31 +00:00
John Kessenich
4d6570a1b3
Fix several issues in the preprocessor:
...
- macro expansion of hexidecimal numbers
- give errors instead of warnings/silence on extra tokens after #endif, #else, etc.
- give errors on reserved macro name use, reuse of argument, and redefinition with different whitespace presence
- detect and give error for all cases of #elif and #else after #else
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23982 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-10 23:07:36 +00:00