Commit Graph

56 Commits

Author SHA1 Message Date
John Kessenich
dcab977055 docs: Update missing features list 2015-07-06 14:17:11 -06:00
John Kessenich
a7a68a9b32 Non-functional misc. changes. Slight increase in performance from moving two performance path methods into a header.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27835 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-24 18:21:00 +00:00
John Kessenich
d78ca6297d Implement atomic counter offset semantics.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27760 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-19 06:08:38 +00:00
John Kessenich
aa657c117e Implement 'index' layout qualifier for fragment outputs. Based partly on a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27759 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-19 02:12:44 +00:00
John Kessenich
a3d8557a44 Turn on the sampler 2DMS types for ES 3.1.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27741 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-14 23:30:11 +00:00
John Kessenich
58f5a5e77a Add fma(), tie the 2x16 stuff to the correct versions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27739 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-14 20:05:57 +00:00
John Kessenich
0a33592810 Implement frexp, ldexp, packUnorm2x16, unpackUnorm2x16, packUnorm4x8, packSnorm4x8, unpackUnorm4x8, unpackSnorm4x8, and unpackDouble2x32().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27738 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-14 19:45:52 +00:00
John Kessenich
b3007519fc Miscellaneous ES 3.1 semantics, and identification of all missing features.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27732 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-14 07:07:21 +00:00
John Kessenich
be70339296 Add the bitField built-in functions. Mark 330 as being complete.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27728 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 20:04:19 +00:00
John Kessenich
67cf1f6179 Turn on basic support for shader storage buffer objects, but not yet the entire extension.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27699 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-12 02:11:55 +00:00
John Kessenich
79cddfcb56 Finish implementing compute shaders, within #version 430, partly based on a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27674 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-11 02:32:30 +00:00
John Kessenich
ddea678e3e Implement GL_ARB_shader_image_load_store. Partly done (format layout qualifiers) from a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27670 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-10 18:19:36 +00:00
John Kessenich
92f9038388 Create dummy side project.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27519 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-07-28 04:21:04 +00:00
John Kessenich
ad47ee8909 Non-functional tweak to hidden-member (of anonymous block) semantics.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26610 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-05-12 18:12:04 +00:00
John Kessenich
0b9e112da6 420Pack: Implement length() on vectors and matrices. Also, tweak line-continuation semantics to understand the extension.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26601 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-05-10 22:24:50 +00:00
John Kessenich
8a1a4a7a8b Implement implicit conversions on function return expressions to the function's type.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26501 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-05-06 06:02:01 +00:00
John Kessenich
f000058fd9 Allow the pre-150 built-in redeclarations when using SSO: gl_Position, gl_PointSize, gl_ClipVertex, and gl_FogFragCoord.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26399 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-24 22:38:50 +00:00
John Kessenich
040b8ca9d4 Just make computeTypeLocationSize const.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26354 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-22 19:06:23 +00:00
John Kessenich
e96ee859a8 Establish desktop completeness through version 1.50. (gl_MaxVaryingFloats, implicit-cconversion safety, cube-sampler-array fix, add tests)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26253 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-14 22:08:16 +00:00
John Kessenich
cf0206c341 Restore r26245 and all tests and test results since 4/1:
r26245: Remove "not yet complete" warning for versions 130 and 140, after tidying up a bit and adding tests.  Token pasting is the only known missing feature, and gives its own message now on use.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-14 15:46:40 +00:00
John Kessenich
4094630ca3 GL_ARB_enhanced_layouts, final. #extension tests, built-in constants, and bug fix for non-constant expression in layout(...=expr).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25220 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-03 16:28:23 +00:00
John Kessenich
68546c6ca4 GL_ARB_enhanced_layouts, part 2: Full implementation of location/component, plus the parsing for xfb* and align/offset (but not yet full semantics for align/offset).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24692 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-08 23:25:18 +00:00
John Kessenich
7c908d2543 Additional semantic checking for tessellation shaders and related clean up:
- non-arrayed geometry inputs and tessellation-control outputs
 - include user blocks in i/o array resizing based on primitive type
 - things belonging only to 'in' or 'out' are verified only on 'in' or 'out'
 - invocation number changing
 - move shader-scoped qualifier checking into its class
 - remove an incidental union of two levels of the node hierarchy in the yacc stack
 - remove layout(location=) default tracking when setting on a variable


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24551 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-18 03:06:24 +00:00
John Kessenich
623833fabc Tessellation partial implementation (not ready for use yet), including:
- the built-in constants
 - built-in variable declarations, some dependent on gl_MaxPatchVertices
 - layout qualifier for vertices (shared with geometry shader max_vertices)
 - layout qualifiers for vertex spacing, vertex order, point mode, and primitive type
 - link semantics for layout qualifiers

Still TBD:
 - patch qualifier and arrayed input handling
 - sizing of gl_out[]
 - additional semantic checking
 - supporting the extension on version 150

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-11 18:57:40 +00:00
John Kessenich
e1b2e39a56 Allow layout aliasing for desktop vertex inputs.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24400 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-07 00:28:07 +00:00
John Kessenich
5f15d4224a Desktop array size limit checking for gl_ClipDistance[] and gl_TexCoord[].
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24397 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 23:57:42 +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
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
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
11f9fc7247 Add and partially implement an interface for doing uniform reflection. It includes an AST traversal to identify live accesses.
It does not yet correctly compute block offsets, give correct GL-API-style type values, or handle arrays.

This is tied to the new -q flag.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23938 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-07 01:06:34 +00:00
John Kessenich
8ec55cdcd2 Clean up/resolve a bunch of TODO, which included implementing pixel_center_integer and origin_upper_left and adjusting what versions see legacy texturing names.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23874 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-05 18:07:25 +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
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
94fdd1117b Add geometry-shader stream, invocations, max_vertices, lines, triangles, etc. layout qualifiers, and their default/inheritance behaviors, and some other misc. geometry shader features. (Geometry shaders are not yet done though.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23679 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-23 19:34:05 +00:00
John Kessenich
21a8770f92 Add texture gather functions (and extension check) for GLSL 400 and GL_ARB_texture_gather.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23631 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-21 19:25:59 +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
8d8f4cc408 Minor preprocessor fix for error message line/string numbers coming from source line, not macro line.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23576 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-18 03:09:37 +00:00
John Kessenich
fb57e7cc5e Add ES 3.0 fragment output link-time test for outputs having or not having location qualifiers.
Also split linker validation into its own file, removed dead "QualifierAlive" files, printed errors for parsing problems with built-in symbols,  updated the Windows binary, and added some tests.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23490 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-15 21:46:20 +00:00
John Kessenich
9d30218fb6 Generalize the symbol hierarchy to transparently handle anonymous-block members better.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23469 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-11 17:29:19 +00:00
John Kessenich
61c2d1410a Document how to add a new feature enabled by an extension in Versions.cpp. Also reorganized slightly to localize related functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23376 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-03 20:23:57 +00:00
John Kessenich
a5830dfc0e Add the following ESSL 2.0 (#version 100) limitations to the configuration file, internal infrastructure, and test cases. Still need to implement the actual detection of non-inductive loops and array accesses. While and do-while loop detection is done.
nonInductiveForLoops
whileLoops
doWhileLoops
generalUniformIndexing
generalAttributeMatrixVectorIndexing
generalVaryingIndexing
generalSamplerIndexing
generalVariableIndexing
generalConstantMatrixVectorIndexing


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23323 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-02 05:10:48 +00:00
John Kessenich
2ecdd14288 Add function recursion testing to the link-time validation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23309 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-01 21:58:43 +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
f5ebfb5f27 Test for and prevent any dead-code elimination, as all code is needed in the AST for static-use analysis.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23163 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-20 06:20:21 +00:00
John Kessenich
05a7063007 Add optional configuration file for specifying (existing) limits. Details explained by usage statement. More limits to be added in the future.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23105 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-17 19:26:08 +00:00
John Kessenich
38f3b890de Ensure the shared symbol table levels are read-only to make multi-threading safe. Also removed inadvertent extra copies of the symbol table shared across all stages.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22939 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-06 19:52:57 +00:00
John Kessenich
94a81fbd31 Option rationalization and minor clean up.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22907 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-31 02:41:30 +00:00