Commit Graph

43 Commits

Author SHA1 Message Date
Nathaniel Cesario
091b9fd979 Fix GL_ARB_shader_storage_buffer_object version
Ensure that GL_ARB_shader_storage_buffer_object is available from
version GL 400 to GL 420.

Closes #3263.
2023-11-07 15:56:52 -07:00
Malcolm Bechard
275d7ae882 only declare compatibility gl_ variables in compatibility mode
avoid declaring them in GLSL 1.50+ if core profile is chosen by the
version statement

fixes #2663
2021-06-10 21:52:09 -04:00
Caio Marcelo de Oliveira Filho
4bfbf62794 Add support for GL_EXT_shared_memory_block
Uses SPV_KHR_workgroup_memory_explicit_layout.  Note that if
GL_EXT_scalar_block_layout is enabled, Workgroup blocks can also use
scalar layout.
2021-01-29 11:23:05 -08:00
John Kessenich
1c3ab274b1 Test Results Only: Include size in implicitly sized arrays (change to unsized).
This effects 60 tests, in a trivial way, but is critical to factor out this
noise from future planned changes.
2018-03-25 14:05:38 -06:00
John Kessenich
e00e8f45a6 GLSL: replace general missing functionality with specific messages. 2017-06-05 16:42:33 -06:00
John Kessenich
ba5cc2fafa GLSL: Fix #822: Improve information given for syntax errors.
Also, fixed one test file that didn't have its syntax error as the last line.
2017-04-20 12:21:53 -06:00
John Kessenich
71c100d7c0 GLSL output: Removed fixed-size buffer; fixes #769.
Makes some white-space differences in most output, plus a few cases
where more could have been put out but was cut short by the previous
fix-sized buffer.
2017-03-14 19:51:29 -06:00
John Kessenich
906cc21816 Linker: Eliminate uncalled functions, because they can be ill-defined.
Fixes issue #610. Also provides a testing option to keep uncalled functions.
2016-12-09 19:22:20 -07:00
John Kessenich
d3f1122a44 Whole stack: Fix stale types in the AST linker object nodes, fixing #557.
Rationalizes the entire tracking of the linker object nodes, effecting
GLSL, HLSL, and SPIR-V, to allow tracked objects to be fully edited before
their type snapshot for linker objects.

Should only effect things when the rest of the AST contained no reference to
the symbol, because normal AST nodes were not stale. Also will only effect such
objects when their types were edited.
2016-11-05 10:22:33 -06:00
John Kessenich
712ecb96a2 Doubles: Add all the missing built-in double-based prototypes. 2016-01-16 20:37:43 -07:00
John Kessenich
cc16fa0720 Tests: Move to just linefeed to simply cross-platform test changes. 2015-12-10 18:01:54 -07:00
John Kessenich
8c1c2ca0d7 Built-ins: fix mapping of packDouble2x32 and unpackDouble2x32. 2015-12-06 19:33:07 -07:00
John Kessenich
eb505e4262 Allow future keywords to be accessed as members in a struct.
This fixes a bug where a token that could be a keyword in one version
is not a keyword in another version, but treated like a non-member after
a "." dereference.
2015-10-02 15:01:53 -06:00
John Kessenich
2398b3a458 Full stack: implement textureQueryLod(*) and textureQueryLevels(*). 2015-09-15 19:38:56 -06:00
John Kessenich
0fc4338f3e Implement GL_OES_shader_multisample_interpolation, as well as core desktop versions of it. 2015-08-22 13:11:12 -06:00
John Kessenich
fc51d284aa Backward incompatible: Turn on PureOperatorBuiltins: use only enum-based built-in functions in the AST.
If this breaks your AST consumer, best is to modify it to test
against the enum values instead of doing string comparisons on
built-in function names.  This is the reason the change was made.

If you need the old behavior, you should be able to get it back by changing
PureOperatorBuiltins to be false instead of true.  This path will work for
a while, but is marked deprecated.

Also, the old behavior is tagged as release 2.4.
2015-08-19 13:43:25 -06:00
John Kessenich
e88217b7d8 Add more TOperator: fma/frexp/ldexp, AddCarry/SubBorrow/MulExtended/Bit*/Find*, (un)pack4x8/2x32, ftransform.
Also corrects some existing ones missing the "Op" part of their name.
2015-08-18 22:27:23 -06:00
John Kessenich
dff18a2be0 glslang: Formally track all built-in variables, right from the beginning, to enable avoiding all textual compares at any subsequent stage in the stack. (To be used in future check ins.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31224 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-18 16:45:49 +00:00
John Kessenich
09388459a8 glslang: Correct global precision qualifiers to make the qualifier global instead of temp (local).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30975 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-29 11:00:28 +00:00
John Kessenich
8b37b04ecc glslang AST output: include global vs. temp (local) in the printed output. This only effects test results, but a future check-in is going to fix some globals.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30973 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-29 10:16:56 +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
13fd6c9dd7 Implement GL_ARB_derivative_control.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27713 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 04:15:56 +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
f2d042a1fe Non-functional, infrastructure: Be more explicit about "implicit array sizes", improving the infrastructure for handling them. Also fix some output that was too big for its buffer.
There is more upcoming functionality for link-time sizing of implicitly-sized arrays that will use this.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26176 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-02 02:27:26 +00:00
John Kessenich
b4ef9e0d56 Track which extensions were enabled or required, in the intermediate representation, for reflection of the consumer.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26155 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-31 22:20:47 +00:00
John Kessenich
f5dd2f5c7c Expand implicit argument conversions to also include handling built-in function calls.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26080 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-26 03:17:31 +00:00
John Kessenich
7cbfdf4394 Minor infrastructure changes, to simplify an upcoming check in:
- print out block member types when printing a block (makes all test results change)
 - const versions of all intermediate.h type-identification methods
 - layoutSlotLocation -> layoutLocation

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24664 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-06 21:27:56 +00:00
John Kessenich
116c30b6ed Tessellation: implement 'patch' semantics.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24486 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-12 01:25:37 +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
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
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
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
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
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
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
c78a126ba6 Tie "location = " to the right stages/versions/extensions. Also add "#define extension 1" extension support and instructions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23633 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-22 00:21:04 +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
e7c59c187c Add all built-in variables for all versions/profiles/stages of GLSL. Also, made more readable; declarations are cut and paste from the specs, with quotes around them. This does not include built-in constants yet (other than MaxClipDistances), just the non-constants.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23551 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-16 22:28:35 +00:00
John Kessenich
98c2ef25de Non-functional changes: Typo in error message and in comment, remove unneeded arguments, separate constructor-op mapping from handling constructors.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23389 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-05 19:03:50 +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
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
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