Commit Graph

77 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
56bdcfaf0e Add test for sample mask bulk load/store. 2023-10-23 12:45:08 +02:00
Hans-Kristian Arntzen
87e1ca4290 Add test for plain variable mesh position. 2023-07-03 14:25:22 +02:00
Hans-Kristian Arntzen
8ec95fbe16 Consider dynamically indexed gl_Position in mesh. 2023-07-03 14:20:27 +02:00
Hans-Kristian Arntzen
a3d711cbf1 HLSL: Move new mesh shader around to more suitable location. 2023-07-03 14:03:04 +02:00
Hans-Kristian Arntzen
a5ec818d41 HLSL: Add test for straddling + holes in struct. 2023-04-27 17:40:02 +02: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
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
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
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
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
2d5200650a HLSL: Add native support for 16-bit types.
Adds support for templated load/store in SM 6.2 to deal with small
types.
2020-06-04 12:33:56 +02:00
Hans-Kristian Arntzen
0ebb88cc39 MSL: Redirect member indices when buffer has been sorted by Offset.
If a buffer rewrites its Offsets, all member references to that struct
are invalidated, and must be redirected, do so in to_member_reference,
but there might be other places where this is needed. Fix as required.
SPIR-V code relying on this is somewhat questionable, but seems to be
in-spec.
2020-04-30 11:48:53 +02:00
Hans-Kristian Arntzen
9b7140e2ba Implement OpAtomicLoad/OpAtomicStore.
Need some emulation on GLSL/HLSL, fix bug with atomic store on MSL.
2020-04-27 12:11:46 +02:00
Hans-Kristian Arntzen
b8905bbd95 Add support for forcefully zero-initialized variables.
Useful to better support certain platforms which require all variables
to be initialized to something.
2020-03-26 13:38:27 +01:00
Hans-Kristian Arntzen
05004a57ea GLSL/HLSL: Fix nonuniform qualifier for SSBO atomics. 2020-03-19 12:05:27 +01:00