Hans-Kristian Arntzen
1adc53b107
Merge pull request #1806 from KhronosGroup/fix-1777
...
CFG: Handle degenerate selection constructs.
2021-11-07 14:10:48 +01:00
Hans-Kristian Arntzen
2714f5410c
CFG: Handle degenerate selection constructs.
...
Apparently, it's legal to use a selection construct where both paths
branch to same location, but a different merge point is used.
This breaks many assumptions the variable scope analyzer makes.
The only logical way to generate code for this scenario is to treat the
selection construct as a trivial switch construct with only a default
case.
2021-11-07 13:32:29 +01:00
Hans-Kristian Arntzen
4561ecddbd
Handle Modf/Frexp in more cases.
...
Consider it a write to a variable, similar to OpStore.
2021-11-07 11:36:44 +01:00
Erfan Ahmadi
43eecb2360
SPIRV-Cross contribution needed for INTEL_fragment_shader_ordering
2021-10-25 10:50:10 +02:00
Hans-Kristian Arntzen
6382f15470
Test behavior around OpSelect with matrices.
2021-10-13 16:08:29 +02:00
Hans-Kristian Arntzen
6071df5840
Fix wrong detection of trivial_mix_op.
...
Effectively, only the last component of the select was considered, need
to correctly early out if any case is hit.
2021-10-13 15:34:00 +02:00
Hans-Kristian Arntzen
f72bb3c6f5
Improve handling of INT_MIN/INT64_MIN literals.
...
We cannot naively convert these to decimal literals. C/C++ (and thus
MSL) has extremely awkward literal promotion rules.
2021-09-30 16:29:30 +02:00
Hans-Kristian Arntzen
23c4480d8e
Fix switch fallthrough case in some cases.
2021-08-31 17:24:09 +02:00
Hans-Kristian Arntzen
cb613eb675
Handle value access in terminators.
...
Fixes case where value is created inside loop body and consumed by a
return outside it.
2021-07-29 15:27:52 +02:00
Hans-Kristian Arntzen
18f3cd6810
GLSL: Ensure ray query object decls are flushed if allocated in Function.
...
glslang always emits Private variables, but DXC not so much.
2021-07-20 12:04:00 +02:00
Hans-Kristian Arntzen
206ee8f171
GLSL: Support pervertexNV in NV barycentric extension.
2021-06-30 16:27:46 +02:00
Hans-Kristian Arntzen
8216e87f02
Handle SPIR-V 1.4 selection constructs.
...
Fix bug in to_trivial_mix_op, where we made a pre-1.4 assumption that
component count of selector is equal to value component count.
2021-06-28 12:23:44 +02:00
Hans-Kristian Arntzen
165dbff228
Handle odd type for textureGather component.
2021-06-03 11:37:45 +02:00
Hans-Kristian Arntzen
26a4986009
GLSL: Implement noncoherent framebuffer fetch.
2021-05-21 14:22:57 +02:00
Hans-Kristian Arntzen
6dbab0df47
Update reference output.
2021-05-07 11:12:22 +02:00
Hans-Kristian Arntzen
532f65583e
Rewrite how non-uniform qualifiers are handled.
...
Remove all shenanigans with propagation, and only consume nonuniform
qualifiers exactly where needed (last minute).
2021-04-22 16:03:08 +02:00
Hans-Kristian Arntzen
d137abeef5
Merge pull request #1655 from KhronosGroup/fix-1640
...
GLSL: Support shading rate builtins.
2021-04-20 16:35:02 +02:00
Hans-Kristian Arntzen
8e24e0b224
Merge pull request #1654 from KhronosGroup/fix-1641
...
GLSL: Implement gl_FragFullyCoveredNV.
2021-04-20 16:34:53 +02:00
Hans-Kristian Arntzen
c89b5a1a3f
GLSL: Support shading rate builtins.
2021-04-20 13:58:07 +02:00
Hans-Kristian Arntzen
3fd148450a
GLSL: Implement gl_FragFullyCoveredNV.
2021-04-20 13:44:52 +02:00
Hans-Kristian Arntzen
f93a8fb1fe
GLSL: Support GL_EXT_shader_image_load_formatted.
2021-04-20 13:36:51 +02:00
Hans-Kristian Arntzen
ee31e84e30
GLSL: Handle complex load/store scenarios to gl_SampleMask.
...
Need special workarounds to handle array load/store since array size is
unsized in GLSL, and array copy is not possible.
Also, consider bitcast for scalar loads and stores.
2021-03-09 10:25:03 +01:00
Hans-Kristian Arntzen
fb1f295aaf
Merge pull request #1635 from KhronosGroup/fix-1627
...
Handle edge cases in OpCopyMemory.
2021-03-09 10:21:35 +01:00
Hans-Kristian Arntzen
4ca06c7278
Handle edge cases in OpCopyMemory.
...
Implement this by synthesizing an OpLoad/OpStore pair instead.
2021-03-08 14:15:27 +01:00
Hans-Kristian Arntzen
5570043af3
GLSL: Add support for Logical subgroup ops.
...
Completely missed these ...
2021-03-08 12:06:46 +01:00
Hans-Kristian Arntzen
ea02a0c03a
Check entry point variables in is_hidden_variables.
...
Need to be careful not to emit globals we're not supposed to.
2021-01-22 13:53:22 +01:00
Hans-Kristian Arntzen
4bedad3860
Handle nonuniformEXT qualifier for acceleration structures.
2021-01-22 13:13:56 +01:00
Hans-Kristian Arntzen
7ab3f3f74e
Deal better with CompositeExtract from constant composite.
...
There is no good reason for applications to emit this kind of code, but
some do. Special case this scenario.
2021-01-22 12:30:16 +01:00
Hans-Kristian Arntzen
03ee71e86c
Add test for pure initializer gl_FragDepth.
...
Tests that the builtin is considered active.
2021-01-07 15:32:15 +01:00
Hans-Kristian Arntzen
3776d8978c
GLSL: Force block declaration if clip/cull is used in tesc.
2021-01-07 15:32:15 +01:00
Hans-Kristian Arntzen
6a3ea0385e
GLSL: Add test for initializing tess level output.
2021-01-05 12:12:26 +01:00
Hans-Kristian Arntzen
175381fe08
GLSL: Handle some extreme edge cases in Output variable initialization.
...
Deal with patch blocks, arrays of patch blocks, arrays of blocks, etc.
2021-01-05 12:06:36 +01:00
Hans-Kristian Arntzen
a1c784f002
More robust handling of initialized output builtin variables.
2021-01-04 19:12:43 +01:00
Hans-Kristian Arntzen
9a304fe931
Handle output IO block initializers more robustly.
2021-01-04 19:04:10 +01:00
Hans-Kristian Arntzen
ddb3c65648
Handle reserved identifiers for functions.
...
gl_ identifiers are already handled by fixups, so remove redundant code.
2021-01-04 10:00:12 +01:00
Hans-Kristian Arntzen
c8765a75f2
GLSL: Fix KHR subgroup extension table for subgroups.
2020-12-11 12:26:43 +01:00
Hans-Kristian Arntzen
762c3082ae
Merge pull request #1564 from KhronosGroup/fix-1558
...
GLSL: Emit nonuniformEXT in correct place for late-combined samplers.
2020-12-07 14:07:38 +01:00
Hans-Kristian Arntzen
a11c4780d0
GLSL: Emit nonuniformEXT in correct place for late-combined samplers.
...
Need to emit nonuniformEXT(sampler2D()) since constructor expressions in
Vulkan GLSL do not propgate the nonuniform qualifier.
2020-12-07 13:00:15 +01:00
Hans-Kristian Arntzen
dc940846d7
GLSL/HLSL: Disallow VariablePointers capability outright.
...
Cannot be supported, error out early.
2020-12-07 12:16:02 +01:00
Hans-Kristian Arntzen
e07f0a9df5
GLSL: Fix buffer_reference with aliased names.
2020-11-23 16:36:49 +01:00
Hans-Kristian Arntzen
6a614cc7f7
Normalize all internal workaround methods to use spv prefix.
...
We have been interchanging spv and SPIRV_Cross_ for a while, which
causes weirdness since we don't explicitly ban SPIRV_Cross identifiers,
as these identifiers are generally used for interface variable
workarounds.
2020-11-23 15:42:27 +01:00
Hans-Kristian Arntzen
71fcf0d9e6
Update texture gather test result.
2020-11-08 13:54:30 +01:00
Hans-Kristian Arntzen
db13762297
MSL: Fix regression in image gather handling.
...
It was not always possible to get backing variable for a late-combined
image sampler.
2020-11-06 16:21:30 +01:00
criss
6402586015
Updated ref file for subgroups_basicvoteballot.vk.comp
2020-11-02 18:40:56 +01:00
Hans-Kristian Arntzen
439b666829
GLSL: Fix nonuniformEXT injection.
...
Needs to consider that other expressions might be using brackets as well
...
2020-10-30 14:11:16 +01:00
Hans-Kristian Arntzen
542d460364
Handle case where block is loop header, continue AND break block.
2020-10-27 12:29:08 +01:00
Hans-Kristian Arntzen
5619329665
Style nits for GL subgroup implementation.
2020-10-08 13:25:29 +02:00
Hans-Kristian Arntzen
a6f6547cf1
Add missing VK variant of the test file.
2020-10-08 12:22:45 +02:00
Hans-Kristian Arntzen
28994a3186
Update GL subgroup test file.
2020-10-08 12:22:24 +02:00
criss
db52e277b9
Resolved issues 1350, 1351, 1352
2020-10-08 12:14:52 +02:00