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
0d22e31c75
Implement 1.20 style function signature matching under implicit conversion. This was the last key unimplemented feature of versions 120 through 330.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23798 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-30 23:17:34 +00:00
John Kessenich
e17ef84753
Fix bug where bracket dereferences were incorrectly keeping the base's qualifier (for example constBase[i] would still be a const instead of EvqTemporary).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23722 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-28 19:49:16 +00:00
John Kessenich
9497485e14
Add geometry shader input array sizing/checking WRT declared input primitive layout.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23698 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-24 22:41:04 +00:00
John Kessenich
ab41fe5df6
Add redeclarations of built-in blocks.
...
Note: lots of test results changed due to listing the members of a block when printing types.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23682 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-24 01:25:40 +00:00
John Kessenich
8f13e1322d
Add swizzles to scalars.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23580 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-18 03:56:23 +00:00
John Kessenich
447fc3613a
Add message indicating level of completeness for not-yet-complete versions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23313 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-01 23:13:50 +00:00
John Kessenich
f2ee3dd46a
Add full support for uniforms with initializers, including intra-stage link validation of aggregate constant initializers.
...
This included
- encapsulating aggregate constants
- removal of constant-aggregate comparison algorithms, instead using a flattened and direct std::vector comparison
- adding structure type comparison for independently declared structures that still might match types
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23274 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-28 04:02:08 +00:00
John Kessenich
9839e2440e
Unify the 8 grammar productions for declaring variables. This greatly simplifies making changes for this set of productions.
...
This change also naturally picks up redeclarations of built-in arrays and the addition of the remaining linker objects of const, arrays, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23246 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-26 00:45:21 +00:00
John Kessenich
337dbc7d8c
Add basic intra-stage linking validation for matching types and qualification of uniforms/ins/outs/globals, function body duplication, and mixing ES/non-ES shaders.
...
Still need to handle arrays and built-in redeclarations, and many more rules, but this puts the basics in place.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23225 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-24 21:18:46 +00:00
John Kessenich
5f753e0222
Full thread safety working:
...
- don't use [] for map lookups, it can modify the map
- copy up built-in symbols out of shared symbol table levels before modifying them
- enforce shallow vs. deep TType copies
- combine maxArraySize with the array dimensions vector, encapsulate
- remove chaining of array types
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22953 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-08 21:04:46 +00:00
John Kessenich
d46b31fdc5
Give new scopes to non-compound (simple) if-then-else substatements, correcting scoping for declarations they contain.
...
Also, updated several tests and the Todo list.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22845 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-27 03:59:04 +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