David Neto
8c3d5b4b6c
SPIR-V: Aggressively prune unreachable merge, continue target
...
More aggressively prune unreachable code as follows.
When no control flow edges reach a merge block or continue target:
- delete their contents so that:
- a merge block becomes OpLabel, then OpUnreachable
- a continue target becomes OpLabel, then an OpBranch back to the
loop header
- any basic block which is dominated by such a merge block or continue
target is removed as well.
- decorations targeting the removed instructions are removed.
Enables the SPIR-V builder post-processing step the GLSLANG_WEB case.
2019-10-29 15:33:54 -04:00
Jeff Bolz
016ddee83a
Only apply volatile semantics to atomics when using Vulkan Memory Model
2019-10-17 11:22:57 -05:00
John Kessenich
b03e4fc4e0
Merge pull request #1866 from rumblehhh/master
...
Export glslang targets on installation
2019-10-15 04:25:20 -06:00
John Kessenich
2d9b0a3550
HLSL: Fix #1912 : add attribute syntax for overriding image formats.
2019-09-28 11:39:15 -06:00
John Kessenich
90e402f42b
SPV_KHR_physical_storage_buffer/SPV: Add GL_EXT_buffer_reference_uvec2
...
Adds uvec2 <-> reference constructor support.
Switches from EXT to KHR for physical_storage_buffer.
2019-09-18 23:52:36 -06:00
Jeff Bolz
c5b669e04c
Add GL_EXT_shader_subgroup_extended_types support
2019-09-17 23:44:27 -05:00
Jeff Bolz
387657e4cf
GL_NV_integer_cooperative_matrix support
2019-08-22 20:37:59 -05:00
John Kessenich
9a5689f632
GLSL: Inherit memory qualifiers, both declaratively and in execution.
...
Fixes #1870 , probably others.
2019-08-22 08:54:22 -06:00
John Kessenich
b9197c812e
Web: Make switched methods all be non-virtual, more web-dependent code,
...
added a few more HLSL flag tests. This was mostly focused on the SPV generator.
Saves about 17K.
2019-08-20 23:21:56 -06:00
John Kessenich
b6d3ee5aca
Web: Turn off bracket-style attributes, reflection, and IO mapping.
2019-08-20 23:21:55 -06:00
John Kessenich
7015bd658e
Web: Remove/rationalize a set of *_EXTENSIONS, using GLSLANG_WEB.
...
Focus was on the front end (not SPIR-V), minus the grammar.
Reduces #ifdef count by around 320 and makes the web build 270K smaller,
which is about 90% the target size.
The grammar and scanner will be another step, as will the SPIR-V backend.
This makes heavy use of methods #ifdef'd to return false as a global way
of turning off code, relying on C++ DCE to do the rest.
2019-08-20 23:21:55 -06:00
James Rumble
c6f7294ced
Handle install vs build include directories
...
Fix target_include_directories to appropriately handle build-tree and the install-tree.
2019-08-06 15:29:31 +01:00
James Rumble
ab6d1499e1
Export glslang targets on installation
...
This allows the targets to be used in other cmake projects. See the following for more details:
https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages
https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html
2019-08-06 14:47:51 +01:00
John Kessenich
7fc8683491
Merge pull request #1813 from jeffbolznv/compositeconstruct
...
Handle SPIR-V type mismatch when constructing a composite
2019-07-28 23:20:26 -06:00
Sahil Parmar
f2dcc87c6a
Allow unsized view array dimension for non-block perviewNV attributes
2019-07-15 16:14:00 -07:00
John Kessenich
96524f9168
SPV: Fix #1783 : Don't do bounds checking for spec-const-expression size
...
It's okay for symbolic spec-consts, but without constant folding,
not okay when the array size is an expression.
2019-07-03 09:37:25 -06:00
John Kessenich
4b4b41a634
HLSL: Fix #1815 : Don't constant fold spec-constant array indexing.
2019-07-03 01:28:51 -06:00
Jeff Bolz
ba6170b534
Implement GL_EXT_demote_to_helper_invocation
2019-07-01 09:36:15 -05:00
Jeff Bolz
531344905f
Handle SPIR-V type mismatch when constructing a composite
2019-06-25 13:32:35 -05:00
Jeff Bolz
8912336663
Add test for constant type conversion
2019-06-21 23:32:25 -05:00
John Kessenich
5d73a3c95c
Merge pull request #1698 from jeffbolznv/private_storage_variables
...
Add Float16/Int8/Int16 capabilities for private variables and function parameters
2019-06-17 23:42:13 -06:00
Daniel Koch
2cb2f197a7
Add support for GL_NV_shader_sm_builtins
...
Including spirv and AST tests
Also increase size of TBuiltInVariable bitfields since we've now exceeded 127
and add a static_assert to make this easier to find next time it happens!
2019-06-08 08:53:11 -04:00
Jeff Bolz
c6f0ce8dbc
Support GL_ARB_fragment_shader_interlock
2019-06-03 11:55:25 -05:00
Daniel Koch
c3e60ad9b6
Add AST tests for ray tracing shaders
...
with subgroup touch tests (error and non-error cases)
Currently the subgroup built-ins are NOT giving the correct output.
This is fixed in the next commit.
2019-05-31 14:17:22 -04:00
Daniel Koch
3418cb4c98
Add AST tests for mesh and task shaders
...
with subgroup touch testing (error and non-error cases)
Add missing symbolTable.relateToOperator("subgroupMemoryBarrierShared") call for
Mesh/Task shaders so they don't assert in ParseHelper.cpp
2019-05-31 14:17:13 -04:00
Jeff Bolz
8adc2f565e
Allow runtime-sized arrays of acceleration structures
2019-05-30 12:45:15 -05:00
John Kessenich
f43c739ac5
SPV 1.4: Emit SignExtend and ZeroExtend for integer image reads/writes.
2019-05-10 00:02:45 -06:00
John Kessenich
61a5ce190a
SPV 1.4: Lookup tables: Use variable initializer and NonWritable...
...
...when doing a variable lookup on an array of constants.
2019-05-10 00:02:45 -06:00
John Kessenich
fbb6bdf046
SPV 1.4: Add support for OpCopyLogical, careful of Boolean differences.
2019-05-10 00:02:45 -06:00
John Kessenich
1f4d04687b
SPV 1.4: Implement the 5 new loop controls.
2019-05-10 00:02:45 -06:00
John Kessenich
0c1e71a123
SPV 1.4: Use OpSelect for trivial typed non-scalar/vector expressions.
2019-05-10 00:02:45 -06:00
John Kessenich
cfea59d357
SPV 1.4: Add testing infrastructure for SPV 1.4 tests.
...
This includes the test for the first feature of OpEntryPoint.
2019-05-10 00:02:45 -06:00
Jeff Bolz
88220d507e
For nonuniformEXT constructor, make a copy of the node to decorate
2019-05-08 10:24:46 -05:00
John Kessenich
e291f7a09f
Merge pull request #1739 from jeffbolznv/buffer_reference2
...
Add support for GL_EXT_buffer_reference2
2019-05-08 17:12:52 +07:00
Jeff Bolz
758c93364c
Add support for GL_EXT_buffer_reference2
2019-05-01 16:13:26 -05:00
Jeff Bolz
faac86e5d6
If a shader's only use of float16 is for FConvert, add the Float16 capability.
...
When visiting instructions, check that there are no 16-bit storage capabilities
and add the Float16 capability. Same for int8/int16.
2019-05-01 11:45:51 -05:00
Daniel Koch
83170e3f7a
Enable GL_KHR_shader_subgroup properly
...
(and GL_NV_shader_subgroup_partitioned) based on GL/ES version
instead of predicating it on vulkan SPV generation
Also add AST testing.
The glsl.450.subgroup* files are largely the same as the spv.subgroup*
The glsl.es320.subgroup* files are the same as the 450 versions, but modified to be ES compatible.
2019-03-26 13:45:33 -04:00
Jeff Bolz
be63facd80
Handle buffer references vs 'const'
...
Allow constructors to and from references to be constant folded. Section 4.3.3
says constructors whose arguments are all constant expressions must fold.
Disallow 'const' on buffer reference types. It is not a 'non-void transparent
basic data type' (it is not considered 'basic').
Handle buffer reference constants (which can be assigned to a non-const reference,
or can be further folded to another type of constant) by converting to
'constructor(uint64_t constant)' in addConversion.
Disallow == and != operators on reference types.
2019-03-04 12:46:11 -06:00
Jeff Bolz
4605e2ed2b
Implement GL_NV_cooperative_matrix
2019-02-25 23:42:59 -06:00
John Kessenich
a84079dcf3
PP: Fix #1605 : Paste tokens for ## through number->letter transitions.
2019-02-22 08:54:38 -07:00
Jeff Bolz
2b2316d3fa
Add Float16/Int8/Int16 capabilities for private variables and function parameters
2019-02-17 22:50:00 -06:00
John Kessenich
6fee94460f
PP: Fix #1694 : Rationalize errors on partially expanded macro argument.
2019-02-16 07:35:13 -07:00
John Kessenich
9840f11f85
PP: Fix #1694 : Handle badly formed argument substitution.
...
Also added a warning for no space after a macro name.
2019-02-11 03:05:00 -07:00
Rex Xu
eaf31ab98c
Add 8-bit/16-bit transform feedback support for future use
2019-02-03 23:31:32 +08:00
John Kessenich
c9e03360e2
Merge pull request #1675 from nicebyte/ext_yuv_target
...
Add support for GL_EXT_YUV_target
2019-01-29 19:03:11 -08:00
John Kessenich
31fbc11f5d
Build: Remove extra commas in calling INSTANTIATE_TEST_SUITE_P.
...
Hopefully, this fixes the sudden new breakage with the bots.
2019-01-29 16:00:42 -07:00
nicebyte
c28369b75f
Add support for GL_EXT_YUV_target
2019-01-29 13:17:47 -08:00
John Kessenich
544c039d26
HLSL: Fix #1679 : Add HLSL earlydepthstencil -> SPV EarlyFragmentTests.
2019-01-28 22:19:43 -07:00
Jeff Bolz
9f2aec49e9
GL_EXT_buffer_reference
2019-01-07 12:36:13 -06:00
John Kessenich
9ed38739b9
Merge pull request #1627 from greg-lunarg/lines8
...
Add passes to spirv-opt passes to preserve source line info when compiling -g.
2018-12-18 10:38:32 -07:00