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
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
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
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
8a1843ab20
Add some test cases for complex type aliasing scenario.
2020-07-29 13:02:52 +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
Hans-Kristian Arntzen
a3d3c80dd7
GLSL/HLSL: Implement nonuniform qualifier for image atomics.
2020-03-19 11:35:29 +01:00
Hans-Kristian Arntzen
88ddeec49a
HLSL: Deal with casting for WaveActiveMin/Max.
2020-01-09 12:35:18 +01:00
Hans-Kristian Arntzen
151ff1e870
HLSL: Implement stores for complex composites in ByteAddressBuffers.
2020-01-08 14:17:28 +01:00
Hans-Kristian Arntzen
d4ca91f6c2
Move .invalid. test shaders to the more appropriate subfolders.
2019-11-06 10:40:37 +01:00
Hans-Kristian Arntzen
3b5c4c7316
Implement constant empty struct correctly on all backends.
...
MSL actually supports empty structs, so enable that path as well.
2019-10-26 16:10:11 +02:00
Hans-Kristian Arntzen
b960ae3b70
HLSL: Partially implement Unordered compare.
...
We cannot correctly implement unordered equal/ordered not equal without
a lot of extra instructions which slows normal code down.
2019-10-14 15:15:03 +02:00
Hans-Kristian Arntzen
a0c13e4ee8
Do not consider aliased struct types if the master is not a block.
...
It is possible for a shader to declare two plain struct types which
simply share the same OpName without there being an implicit
value/buffer alias relationship.
For to_member_name(), make sure to use the type alias master when
resolving member names. The member name may be different in a type alias
master if the SPIR-V is being intentionally difficult.
2019-10-07 10:52:16 +02:00
Ryan Harrison
cf1bf1c6ae
Update external/ to SPIR-V 1.5
...
Rolled the hashes used for glslang, SPIRV-Tools, and SPIRV-Headers to
HEAD, which includes the update to 1.5.
Added passing '--amb' to glslang, so I didn't have to explicitly set
bindings in a large number of test shaders that currently don't, and
now glslang considers them invalid.
Marked all shaders that no longer pass spirv-val as .invalid.
2019-09-18 16:04:27 -04:00
Hans-Kristian Arntzen
0286442906
Add test case for interlocks in control flow.
2019-09-04 13:10:32 +02:00
Hans-Kristian Arntzen
65e48ca5ea
Add interlock test for split functions doing begin/end.
2019-09-04 12:26:34 +02:00
Hans-Kristian Arntzen
261b46982a
Deal with complex interlock cases in GLSL.
2019-09-04 12:18:04 +02:00
Hans-Kristian Arntzen
b3305799a8
Deal correctly with sign on bitfield operations.
...
Need a lot of special purpose implementation functions for these.
2019-08-26 11:36:36 +02:00
Hans-Kristian Arntzen
c7eda1bce9
Test glsl.std450 more exhaustively.
...
Make sure to test everything with scalar as well to catch any weird edge
cases.
Not all opcodes are covered here, just the arithmetic ones. FP64 packing
is also ignored.
2019-07-17 11:53:05 +02:00
Hans-Kristian Arntzen
932ee0e328
Deal correctly with return sign of bitscan operations.
2019-07-12 10:57:56 +02:00
Hans-Kristian Arntzen
fa9af7223a
Add test shaders for NonUniformEXT propagation.
2019-07-08 11:32:09 +02:00
Hans-Kristian Arntzen
c365cc1b43
Deal with OpPhi and case fallthrough.
...
This is quite complex since we cannot flush Phi inside the case labels,
we have to do it outside by emitting a lot of manual branches ourselves.
This should be extremely rare, but we need to handle this case.
2019-06-21 13:38:23 +02:00
Hans-Kristian Arntzen
8b236f24f1
Fix infinite loop when OpAtomic* temporaries are used in other blocks.
...
We made the mistake of registering a dependency on the atomic variable
even if the atomic result was forced to a temporary. There is no need to
register reads from atomic variables like this as we always force atomic
results to a temporary and argument read/writes do not need to be
tracked.
2019-04-24 09:33:39 +02:00
Hans-Kristian Arntzen
e4d5c6183a
GLSL: Fix OpImageFetch with uint coordinates and LOD.
...
Also fix some minor issues with too many coordinate dimensions in HLSL and GLSL.
2019-04-03 10:50:32 +02:00
Hans-Kristian Arntzen
eeb3f24991
Properly deal with sign-dependent GLSL opcodes.
...
The GLSLstd450 spec is very lax about input signs, so we need to do the
bitcasting dance to implement it correctly.
2019-03-27 12:20:53 +01:00
Hans-Kristian Arntzen
df3e21a762
Parser: Fix OpCompositeConstruct with OpUndef.
...
Just treat any undefined argument as 0. It is risky to use the undefined
variable as it might not lower to a true constant.
2019-03-27 10:51:23 +01:00
Hans-Kristian Arntzen
8eb33c8017
Support -1 index in OpVectorShuffle.
...
-1 (0xffffffff) literal means the component should be undefined.
Since we cannot express undefined directly, just use a 0 literal in the
appropriate type.
2019-03-25 10:17:05 +01:00
Hans-Kristian Arntzen
4e7777c443
Update to latest glslang/SPIRV-Tools.
...
Fix various bugs along the way.
2019-01-30 13:41:57 +01:00
Hans-Kristian Arntzen
e7bf8d2f48
Refactor out noopt shaders to their own folders.
...
Makes maintenance easier with less clutter.
2018-03-13 10:39:49 +01:00