John Kessenich
e4e56bcf86
Merge pull request #1902 from jeffbolznv/extended_types
...
Add GL_EXT_shader_subgroup_extended_types support
2019-09-17 23:18:20 -06:00
Jeff Bolz
c5b669e04c
Add GL_EXT_shader_subgroup_extended_types support
2019-09-17 23:44:27 -05:00
John Kessenich
8317e6c683
SPV: Support SPIR-V 1.5; five extensions no longer need OpExtension.
...
The generalization to addIncorporatedExtension() also fixed a 1.3
corner case with SPV_KHR_16bit_storage.
2019-09-16 07:14:10 -06:00
John Kessenich
aaff6cddd0
SPV 1.5: Switch to the 1.5 header, for SPIR-V 1.5.
2019-09-13 09:32:00 -06:00
Jeff Bolz
387657e4cf
GL_NV_integer_cooperative_matrix support
2019-08-22 20:37:59 -05:00
John Kessenich
deec1933e9
Web: Turn off includes, independent preprocessing path, fine tune all.
...
Saved about 21K, size down to 380K of MSVC x86 code.
Fixed one bug that needs to be looked at on the master branch:
The test for needing a Vulkan binding has a bug in it, "!layoutAttachment"
which does not mean "no layoutAttachment", because that is non-zero.
This is why some test and test results changed.
2019-08-20 23:21:56 -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
fb4f2333da
Web: Use isEsProfile() instead of run-time testing; remove more atomics
...
Saves 2.5K, and design is better.
2019-08-20 23:21:56 -06:00
John Kessenich
155d351f86
Web: Remove unused stage functionality, SPIR-V logger, and hex_utils
...
Saves another 20K.
2019-08-20 23:21:56 -06:00
John Kessenich
39697cdb9d
Web: Remove unnecessary GLSL numeric types, and some collateral.
...
This saves another 40K of x86 binary, which is about 13% of the target size.
2019-08-20 23:21:56 -06:00
John Kessenich
3e4b6ff76a
Web: Tighten up sampling code and interfaces.
...
Saves about 9K.
2019-08-20 23:21:56 -06:00
John Kessenich
eaf4496312
Web: Complete the removal of vendor-specific #ifdef's, including CMake.
2019-08-20 23:21:56 -06:00
John Kessenich
a28f7a75d1
Web: Generalize _EXTENSIONS* in SPIR-V back-end.
...
About 50 fewer #ifdefs.
About 14K smaller.
Note, the base size is ill-defined due to optimizer settings (size vs. performance),
compression, and target architecture. Some recent %'s are accidentally reported as
3X the real savings. Early %'s were accurate. What matters though is that each
step got worthwhile gains, and what the final size ends up being.
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
John Kessenich
23d27751e8
Web: Selectively remove a few key features, using #ifndef GLSLANG_WEB
...
Save about 100K.
N.B.: This is done by eliminating a function call, at a high level,
not by #ifdef'ing a bunch of code.
Also, removed no longer needed *_EXTENSION #ifdef in the code not
needed by GLSLANG_WEB.
2019-08-20 23:21:55 -06:00
John Kessenich
3cea2e5882
Bump revision and give the bots another chance to work.
2019-08-02 06:34:15 -06: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
Ashwin Lele
c1e61d6cff
Fix bugs in missing Builtin decoration for some NV builtins for tessellation
...
control shaders.
Fix bug in member remapping.
2019-07-22 12:36:38 -07:00
John Kessenich
2bb2da9193
SPV: Update to latest SPIR-V header.
2019-07-22 07:06:50 -06:00
Rex Xu
bb7307b4a8
OpIsHelperInvocationEXT should declare relevant SPV extension and capability
2019-07-15 14:57:20 +08:00
Jason Macnak
dbd4c3ce11
spirv: Generate missing SampleMaskOverrideCoverageNV capability op
...
The SampleMaskOverrideCoverageNV capability should be declared when
gl_SampleMask is used.
2019-07-12 14:33:02 -07:00
amhagan
91fb0091a2
Add support for SPV_KHR_shader_clock
2019-07-10 21:34:12 -04:00
Jeff Bolz
6a50a7850d
update spirv-headers to pick up demote_to_helper_invocation
2019-07-02 10:58:15 -05: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
Shahbaz Youssefi
6cca0e983e
Remove extraneous semicolons
...
They cause a warning (-Wextra-semi) that can lead to a compile error
(-Werror).
2019-06-25 13:20:16 -04:00
John Kessenich
9c14f77f5d
AST/SPV: Fix #930 : translate uvec4 <-> uint64 for SubgroupGeMask et. al.
...
On reading built-in variables SubgroupEqMask, SubgroupGeMask, SubgroupGtMask,
SubgroupLeMask, and SubgroupLtMask, the AST expects 64-bit ints, while SPIR-V
is defined as vectors of 32-bit ints.
The declaration type has to be translated in the opposite direction.
2019-06-18 00:36:17 -06:00
John Kessenich
a9b00ac5d5
Merge pull request #1806 from KhronosGroup/nan-clamp
...
SPV: Add a switch for favoring non-NaN operands in min, max, and clamp.
2019-06-18 00:26:25 -06: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
John Kessenich
605afc7b1b
SPV: Add a switch for favoring non-NaN operands in min, max, and clamp.
2019-06-17 23:33:09 -06:00
Jeff Bolz
38a52fca93
Add gl_SemanticsVolatile to GL_KHR_memory_scope_semantics, and make volatile-qualified atomics generate MemorySemanticsVolatile when using the Vulkan memory model
2019-06-14 09:57:01 -05: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
fd556e32b3
Use spvValidatorOptionsSetBeforeHlslLegalization for pre-legalized HLSL
2019-06-07 14:42:08 -05:00
Jeff Bolz
c6f0ce8dbc
Support GL_ARB_fragment_shader_interlock
2019-06-03 11:55:25 -05:00
Daniel Koch
593a4e0aa5
Fix subgroup support for ray tracing
...
Closes #1735
GlslangToSpv.cpp
- minor formatting cleanup
BaseTypes.h
- minor formatting cleanup
- add subgroup builtins to GetBuiltInVariableString
(was resulting in "unknown built-in variable" messages in test output)
Initialize.cpp
- better naming and re-use of strings for subgroup builtin variable declarations
- define subgroup builtin variables in ray-tracing shaders
intermOut.cpp
- add handling of the EOpSubgroupParition* variables
(was resulting in "ERROR: Bad aggregation op" messages in test output)
Update test results.
2019-05-31 14:17:36 -04:00
Daniel Koch
9bb17cd0eb
Return consistent names from CapabilityString
...
Don't prefix with "Capability" since the majority of them don't.
Also add missing CapabilityImageFootprintNV
2019-05-28 15:23:10 -04:00
Matthew Albrecht
cda52d5333
Fixed .dll install on MSVC.
2019-05-23 19:06:44 -05:00
John Kessenich
6e384fef6c
Build: Fix 3 warnings.
2019-05-10 06:47:00 -06:00
John Kessenich
b64952eddd
SPV 1.4: Move to 1.4 validation, removing all 1.4 validation failures.
2019-05-10 00:02:45 -06: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
7c7731ecbb
SPV 1.4: Generate all globals on OpEntryPoint interface list.
2019-05-10 00:02:45 -06:00
John Kessenich
2dd4ab3a4a
SPV: Move to the SPIR-V 1.4 header.
2019-05-09 23:59:37 -06:00
Jeff Bolz
88220d507e
For nonuniformEXT constructor, make a copy of the node to decorate
2019-05-08 10:24:46 -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
John Kessenich
3416d48b59
Update to latest SPIR-V header and bump revision.
2019-04-04 09:38:26 -06:00
Daniel Koch
8b2f96d3fe
Check if _MSC_VER is defined before using.
...
Fixes compilation errors on some platforms.
2019-04-03 17:21:06 -04:00