Hans-Kristian Arntzen
d9afa9e238
MSL: Fix unpack_expression from column of padded matrix.
2019-11-07 11:35:07 +01:00
Hans-Kristian Arntzen
d4ca91f6c2
Move .invalid. test shaders to the more appropriate subfolders.
2019-11-06 10:40:37 +01:00
Dan Sinclair
d409210ee5
Move all .invalid shaders into no-opt folders.
2019-11-05 13:19:19 -05: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
Lukas Hermanns
c236ca4572
Moved all UE4 test shaders into 'shaders-ue4/' folder.
2019-10-23 17:39:05 -04:00
Lukas Hermanns
2482ff708c
Merge remote-tracking branch 'upstream/master'
2019-10-14 11:06:15 -04:00
Hans-Kristian Arntzen
07e9501ae1
MSL: Fix regression with OpCompositeConstruct from std140 float[].
...
Simple fix, just need to use to_unpacked_expression rather than to_expression here to
deal with this.
2019-10-11 11:21:43 +02:00
Lukas Hermanns
0853bcaee1
Disabled spvUnsafeArray<> type for packed vectors and added test cases for those arrays.
2019-10-09 17:59:47 -04: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
63a770ed5c
Add test shader for simple case of interlocked callstack.
2019-09-04 11:56:19 +02:00
Hans-Kristian Arntzen
9436cd3036
MSL: Deal with array copies from and to threadgroup.
2019-08-27 13:18:01 +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
abb345d0b3
MSL: Deal with Modf/Frexp where output is access chain to scalar.
...
This is not allowed as we cannot take mutable reference to a
vec.{x,y,z,w}. We only care about scalar since entire vectors are fine.
2019-07-26 11:02:38 +02:00
Hans-Kristian Arntzen
18bcc9b790
Do not disable temporary forwarding when we suppress usage tracking.
...
This subtle bug removed any expression validation for trivially swizzled
variables. Make usage suppression a more explicit concept rather than
just hacking off forwarded_temporaries.
There is some fallout here with loop generation since our expression
invalidation is currently a bit too naive to handle loops properly.
The forwarding bug masked this problem until now.
If part of the loop condition is also used in the body, we end up
reading an invalid expression, which in turn forces a temporary to be
generated in the condition block, not good. We'll need to be smarter
here ...
2019-07-23 19:18:44 +02:00
Hans-Kristian Arntzen
8ba0507a6d
Add another test for unpacking without load forwarding.
2019-07-23 17:14:59 +02:00
Hans-Kristian Arntzen
1ece67a050
Look at pointee type when unpacking expressions.
...
We might be unpacking in OpLoad, so don't want any pointer types from
access chains creeping in.
2019-07-23 17:07:15 +02:00
Hans-Kristian Arntzen
ebe109d91d
Deal correctly with non-forwarded packed loads.
...
Need to unpack the expression if we're not forwarding.
2019-07-23 16:25:19 +02:00
Hans-Kristian Arntzen
79f533b662
Test CompositeInsert/Extract/VectorShuffle on packed vectors.
2019-07-23 15:44:35 +02:00
Hans-Kristian Arntzen
5582145549
Add test for array of scalar struct.
2019-07-23 15:30:03 +02:00
Hans-Kristian Arntzen
5c1cb7accf
Recursively pack struct types when we find scalar packed structs.
2019-07-23 15:24:53 +02:00
Hans-Kristian Arntzen
0f10601f27
Test matrix multiplies in more complex scenarios.
2019-07-23 12:12:24 +02:00
Hans-Kristian Arntzen
978253c804
Test implicit packing of struct members.
2019-07-23 12:04:15 +02:00
Hans-Kristian Arntzen
fc741596d4
Add tests for struct padding and self-alignment.
2019-07-23 11:46:34 +02:00
Hans-Kristian Arntzen
7277c7ac46
Use to_unpacked_row_major_expression to unify row-major in MSL/GLSL.
2019-07-23 11:36:54 +02:00
Hans-Kristian Arntzen
47a18b9f1b
Simplify row-major matrix/vector multiplies.
2019-07-23 10:56:57 +02:00
Hans-Kristian Arntzen
d584d833fa
Test array of std140 vectors.
2019-07-23 10:38:32 +02:00
Hans-Kristian Arntzen
6224199c76
Add struct size padding tests.
2019-07-23 10:30:37 +02:00
Hans-Kristian Arntzen
82c819ee6c
Add test for CompositeExtract from row-major loaded vector.
2019-07-22 16:32:22 +02:00
Hans-Kristian Arntzen
d7a5303cf2
Add test for split access chain into row-major matrix.
2019-07-22 16:28:05 +02:00
Hans-Kristian Arntzen
172185016f
MSL: Add std140 and scalar matrix layouts.
2019-07-22 11:30:03 +02:00
Hans-Kristian Arntzen
6471236652
MSL: Add std430 matrix access test.
2019-07-22 11:23:06 +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
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
9ae91c2d1e
Deal with mismatched signs in S/U/F conversion opcodes.
2019-04-10 14:03:58 +02:00
Hans-Kristian Arntzen
bf07e5fa7b
MSL: Fix OpLoad of array which is forced to a temporary.
2019-04-09 11:50:45 +02:00
Hans-Kristian Arntzen
44834f2115
Merge pull request #927 from KhronosGroup/fix-925
...
GLSL: Fix OpImageFetch with uint coordinates and LOD.
2019-04-03 12:32:43 +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
7e37623e82
MSL: Fix depth2d 4-component fixup.
...
Need to look at the backing image for the image. We might have found
diverging use at the image variable level, not just expression level.
2019-04-03 10:24:22 +02:00
Hans-Kristian Arntzen
c37f88fea6
MSL: Fix crash where variable storage buffer pointers are passed down.
...
Only deal with readonly decoration for actual block types.
2019-03-28 10:16:46 +01: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
9e3a41ad00
Merge pull request #821 from cdavis5e/pass-sampled-images
...
MSL: Fix passing a sampled image to a function.
2019-01-15 09:05:54 +01:00