Chip Davis
68f0257f26
Use --preserve-numeric-ids when assembling test shaders.
...
This makes it easier to debug codegen for these shaders.
2023-06-23 14:54:16 -07:00
Hans-Kristian Arntzen
a5ec818d41
HLSL: Add test for straddling + holes in struct.
2023-04-27 17:40:02 +02:00
Chip Davis
5547b25afe
Interleave undef values with constants and types.
...
Undef values may be of struct type and may be used in constants.
Therefore, they must be interleaved with constants and types.
Fixes the rest of the Vulkan CTS test
`dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_spec_constant_composite`.
(Please excuse the churn in the reference output; it's an inevitable
result of this change.)
2022-11-20 02:08:37 -08:00
Hans-Kristian Arntzen
b606e4f752
HLSL: Fix test for non-block per-primitive IO.
...
Force gl_in_out path for HLSL as well when mesh shaders are used.
2022-11-02 13:41:32 +01:00
Hans-Kristian Arntzen
3a066cd733
HLSL: Handle case where PerVertex block is not used.
2022-11-02 13:07:32 +01:00
Hans-Kristian Arntzen
b5386e3ea9
HLSL: Improve support for VertexInfo aux struct.
...
Add concept of explicit bindings for aux structs and allows query if
these aux structs are required.
2022-10-03 13:31:27 +02:00
Pedro J. Estébanez
1fe470b199
HLSL: Implement GroupOperation(Inclusive/Exclusive)Scan.
2022-07-22 13:39:37 +02:00
Hans-Kristian Arntzen
4b9e60273c
Add tests for OpCompositeInsert edge cases.
2022-05-18 16:43:32 +02:00
Hans-Kristian Arntzen
4ab5bbb4e5
Fixup names of anonymous inner structs.
...
Just like we try to fixup struct names for block types, inner structs
can be "anonymous" structs. HLSL codegen from DXC tends to emit this,
and emitting dummy struct names tends to break GL linkage on some
drivers.
2022-03-10 15:45:38 +01:00
Hans-Kristian Arntzen
15d29f00e2
Add test for SPIR-V 1.6 Volatile HelperInvocation.
2022-03-04 11:19:33 +01:00
Hans-Kristian Arntzen
5d9fc2d903
HLSL: Add test for HelperInvocation.
2022-03-04 10:58:40 +01:00
Hans-Kristian Arntzen
31be74a853
Add relax_nan_checks options.
...
Makes codegen from typical D3D emulation SPIR-V more readable.
Also makes cross compilation with NotEqual more sensible.
It's very rare to actually need the strict NaN-checks in practice.
Also, glslang now emits UnordNotEqual by default it seems, so give up
trying to assume OrdNotEqual. Harmonize for UnordNotEqual as the sane
default.
2022-03-03 14:50:56 +01:00
Hans-Kristian Arntzen
7af0a5f820
HLSL: Do not emit VPOS fixup unless position is active.
2022-02-28 12:09:57 +01:00
Hans-Kristian Arntzen
ac46140ba3
Test aliased names in declared LUTs.
2022-01-18 12:39:16 +01:00
Hans-Kristian Arntzen
48b5a9069f
Handle aliased names in spec constants.
...
Need to register resource name.
2022-01-18 12:31:28 +01:00
Hans-Kristian Arntzen
7c83fc22fa
Add support for LocalSizeId.
...
WorkgroupSize builtin is deprecated in 1.6 and LocalSizeId is supported
in Vulkan starting with maintenance4.
2022-01-06 13:57:10 +01:00
Hans-Kristian Arntzen
fe8848a6f2
Roll dependencies.
2022-01-05 14:56:01 +01: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
97a438d214
Merge pull request #1757 from KhronosGroup/fix-1754
...
Improve handling of INT_MIN/INT64_MIN literals.
2021-09-30 17:04:30 +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
9b2a8c7622
HLSL: Ensure synthetic NumWorkgroups variable is considered active.
...
In SPIR-V 1.4+, active global variables must be marked as such.
2021-09-30 14:39:42 +02:00
Hans-Kristian Arntzen
d6b29ab017
HLSL: Rewrite how block IO is emitted.
...
Emit block members directly in the IO structs and sort them.
Ensures we can get some kind of stable order between stages.
To complete the story, we'll need to be able to inject unused inputs /
builtins, or eliminate unused outputs (probably easiest solution).
2021-06-28 15:04:49 +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
0e963c62b6
HLSL: Support Shuffle wave ops.
...
WaveReadLaneAt is no longer restricted to dynamically uniform index,
so can implement the other shuffle ops.
2021-04-23 13:03:35 +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
96ba044f01
HLSL: Fix automatic location assignment in block IO.
2021-04-20 13:04:26 +02:00
Hans-Kristian Arntzen
d6c2c1b39a
HLSL: Support logical subgroup ops.
2021-03-08 12:52:03 +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
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
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
650b5e1b12
HLSL: Fix validation with FXC for test.
2020-11-23 16:03:35 +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
b3344174f7
HLSL: Add option to flatten matrix vertex input semantics.
...
Helps translation layers where we expect inputs to be multiple float
vectors rather than an indexed matrix.
2020-11-03 11:18:32 +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
f0fe4442e3
Merge pull request #1448 from KhronosGroup/fix-1437
...
HLSL: Fix some subtle bugs in buffer packing handling.
2020-08-20 19:21:50 +02:00
Hans-Kristian Arntzen
fdbc80d131
HLSL: Fix FragCoord.w.
...
Need to invert it, SM 4.0+ uses W, not 1/W (like Vulkan/GL).
2020-08-20 16:22:48 +02:00
Hans-Kristian Arntzen
fad36a6b28
HLSL: Deal with partially filled 16-byte word in cbuffers.
...
The last element of an array or matrix in HLSL cbuffers are not filled
completely, but only have a size equal to the base vector.
2020-08-20 16:05:21 +02:00
Hans-Kristian Arntzen
dd1f53ff15
HLSL: Fix bug in is_packing_standard for cbuffer.
...
Was not keeping offset in sync with actual_offset and HLSL could trigger
spurious realignments due to the straddle check.
2020-08-20 15:26:55 +02:00
Hans-Kristian Arntzen
8a1843ab20
Add some test cases for complex type aliasing scenario.
2020-07-29 13:02:52 +02:00
Hans-Kristian Arntzen
aac6885950
GLSL: Be more aggressive about using type_alias.
...
To facilitate an improved linking-by-name use case for older GL,
we will be more aggressive about merging struct definitions, even for
rather unrelated cases where we don't strictly need to use type aliases.
2020-07-29 12:48:41 +02:00
Hans-Kristian Arntzen
4d79d634f5
GLSL: Implement switch on ESSL 1.0.
...
Cannot use switch on legacy ESSL, fallback to plain branches.
2020-06-29 13:35:46 +02:00