Hans-Kristian Arntzen
af787a8a79
Merge pull request #1264 from KhronosGroup/msl-argument-buffer-persist
...
MSL: Add support for force-activating IAB resources.
2020-01-16 14:44:23 +01:00
Hans-Kristian Arntzen
c3bd136df1
MSL: Add support for force-activating IAB resources.
...
Important for ABI compatibility on MSL in certain cases.
2020-01-16 11:12:06 +01:00
Hans-Kristian Arntzen
f79c1e2fed
Deal with illegal names in types as well.
...
- Fixes issue with clip_distance flattening in MSL where member to
flatten from would come from to_member_name, where it should have used
the builtin name directly. This member name was modified by this patch
and broke clip distance test shaders.
- Some cleanups with ir.meta, use ir.find_meta instead to not create
unnecessary hashmap nodes.
2020-01-16 10:34:49 +01:00
Hans-Kristian Arntzen
79700d5412
Merge pull request #1262 from KhronosGroup/json-reflection-improvements
...
Reflection: Various improvements
2020-01-15 18:51:34 +01:00
Hans-Kristian Arntzen
762c87a7bb
Reflection: Add array stride/matrix stride reflection.
2020-01-15 17:01:35 +01:00
Hans-Kristian Arntzen
18e24c3ca2
Reflection: Emit reflection information for array size literalness.
...
If not literal, check specialization_constant entries for "variable_id"
to link up ID with spec constant values. This maps directly to C++ API.
2020-01-15 16:49:19 +01:00
Hans-Kristian Arntzen
55fe6050fe
GLSL: Implement geometry shader passthrough extension.
2020-01-15 16:18:29 +01:00
Hans-Kristian Arntzen
2bbb012e9c
MSL: Deal with sign on wave min/max.
2020-01-09 12:35:18 +01:00
Hans-Kristian Arntzen
88ddeec49a
HLSL: Deal with casting for WaveActiveMin/Max.
2020-01-09 12:35:18 +01:00
Hans-Kristian Arntzen
5253da9e63
GLSL: Deal with sign in subgroup Min/Max operations.
2020-01-09 12:35:14 +01:00
Hans-Kristian Arntzen
1cbd71b354
HLSL: Fix bug when reading and writing structs from SSBO.
2020-01-08 14:27:02 +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
ca9398c122
HLSL: Support loading complex composites from ByteAddressBuffer.
2020-01-08 13:05:56 +01:00
Hans-Kristian Arntzen
c024e24d45
MSL: Deal with padded fragment output + Component decoration.
2020-01-07 17:02:12 +01:00
Hans-Kristian Arntzen
93f3265fe0
MSL: Deal with packing vectors for vertex input/fragment output.
2020-01-07 14:14:31 +01:00
Hans-Kristian Arntzen
7a69d764b0
MSL: Add trivial tests for Component decoration.
...
Verifies that Component decoration is honored for vertex outputs and
fragment inputs.
2020-01-07 11:36:51 +01:00
Hans-Kristian Arntzen
8bef6ff167
Add test shader for OpCopyLogical with packing/unpacking.
2020-01-06 12:44:18 +01:00
Hans-Kristian Arntzen
9012a39b60
Basic implementation of OpCopyLogical.
2020-01-06 11:47:26 +01:00
Hans-Kristian Arntzen
7c1e34f3b9
GLSL: Fix array of input patch variables.
...
Hoist out the hack to make array sizes unsized to a place where we can
differentiate patch variables from control point variables.
2019-12-10 12:02:12 +01:00
Hans-Kristian Arntzen
d7e612f91a
GLSL: Fix EmitStreamVertex/Primitive.
2019-12-09 10:49:48 +01:00
Hans-Kristian Arntzen
67b2991451
Don't emit memoryBarrierShared() in workgroup control barriers.
...
This is implied in both GL and GLES. Emitting memoryBarrierShared() was
based on earlier confusion in the spec which has since been fixed and
clarified.
2019-12-04 15:06:19 +01:00
Dan Sinclair
b77be9f347
Update graphics robust access results
...
The robust access code was fixed to use a signed clamp which generates
different results in the SPIR-V cross test.
2019-12-03 16:49:43 -05:00
Dan Sinclair
f40c629821
Roll SPIRV-Tools, SPIRV-Headers and GLSLang
...
This CL updates the three depdencies and updates the tests to handle the
new validation errors which are produced.
2019-12-02 16:17:21 -05:00
Hans-Kristian Arntzen
a3fe9756d2
MSL: Support ClipDistance as an input stage variable.
...
MSL does not support this, so we have to emulate it by passing it around
as a varying between stages. We use a special "user(clipN)" attribute
for this rather than locN which is used for user varyings.
2019-12-02 13:19:42 +01:00
Hans-Kristian Arntzen
4edb99d476
Fix sign handling for S/UToF.
2019-11-28 13:55:28 +01:00
Hans-Kristian Arntzen
b85ab5f5ff
MSL: Fix automatic binding allocation for image atomic buffers.
...
The Primary decoration was used by the atomic buffer, causing the
texture binding to be potentially overlapping with other resources.
2019-11-28 11:07:44 +01:00
Hans-Kristian Arntzen
d9afa9e238
MSL: Fix unpack_expression from column of padded matrix.
2019-11-07 11:35:07 +01:00
Hans-Kristian Arntzen
b56c2f4271
Merge branch 'deps' of git://github.com/dj2/SPIRV-Cross
2019-11-06 10:43:17 +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
Dan Sinclair
79721eda12
Remove old reference shaders
2019-11-05 12:49:04 -05:00
Dan Sinclair
e5af41255c
Only run spirv-opt if the spirv is valid.
...
This CL updates the test runner to only run spirv-opt if the generated
SPIR-V is valid. If validation is skipped it's possible to hit aborts
and other memory errors in the optimizer as it assumes the SPIR-V is
valid.
2019-11-05 11:00:49 -05:00
Dan Sinclair
9da21c24a4
Roll GLSLang and SPIRV-Tools
...
This CL rolls the GLSLang and SPIRV-Tools dependencies to tip-of-tree
and updates the tests as required.
2019-11-05 10:07:15 -05:00
Hans-Kristian Arntzen
a8d676f2e4
GLSL: Fix issue with array-of-array inputs in tess.
...
Only one dimension can be unsized and wrong dimension was used for
unrolling purposes.
2019-11-04 10:34:49 +01:00
Hans-Kristian Arntzen
00189b19a5
Merge pull request #1188 from KhronosGroup/missing-reference-ue4
...
MSL: Add missing reference output.
2019-10-29 12:36:01 +01:00
Hans-Kristian Arntzen
42e6ce073b
MSL: Add missing reference output.
2019-10-29 11:17:38 +01:00
Hans-Kristian Arntzen
e2155053c5
Fix broken access tracking for OpFunctionCall results.
...
We were looking at args[1] after incrementing args array, not before,
which means we tracked garbage.
This is also an out-of-bounds hazard.
2019-10-29 11:13:39 +01:00
Hans-Kristian Arntzen
1d5eba67f8
MSL: Remove hacky workaround for patch constant passing.
...
There was a hack to workaround a bug in DXC where control point -> patch
constant phase was passed in Function storage, but we have to use
Workgroup here. We will not support these kinds of hacks for invalid
SPIR-V, so hack the reference files to use the "proper" fix and remove
the hack for time being.
2019-10-28 12:52:28 +01:00
Hans-Kristian Arntzen
8f13a3f4b1
MSL: Remove workaround for passing constant arrays to functions.
...
Arrays are value-types now, so remove the old workaround.
2019-10-28 12:14:43 +01:00
Hans-Kristian Arntzen
32bd1329b6
Remove another dead reference file.
2019-10-28 11:51:31 +01:00
Hans-Kristian Arntzen
8670f7cbab
Remove some more dead reference files.
2019-10-28 11:49:57 +01:00
Hans-Kristian Arntzen
b2c6362c4b
Remove another dead reference file.
2019-10-28 11:33:09 +01:00
Hans-Kristian Arntzen
93ceead289
Remove dead reference file.
2019-10-28 11:31:04 +01:00
Hans-Kristian Arntzen
e1919744e9
Hack some constants in UE4 tests.
...
Need to make output 100% exact for MSVC and GCC libc testing, but they are 1 ULP
off when converting fp32 to string in some weird corner cases.
Roundtrip should be correct though, but that outside the scope of
SPIRV-Cross.
2019-10-28 11:20:41 +01:00
Hans-Kristian Arntzen
648dfa5070
MSL: Ensure stable output for access chain CFG workarounds.
...
We had output dependent on complex_continue being set, but setting that
flag was dependent on unordered_set declaration order. Make it invariant
to ordering and change the implementation so it knows about the new
temporary hoisting for access chains.
2019-10-28 10:57:51 +01:00
Hans-Kristian Arntzen
fa011f8547
MSL: Declare arrays with proper type wrapper.
...
Need to construct with value type spvUnsafeArray<T, N>({ elem0, elem1 })
to make array initialization work in complex scenarios.
2019-10-26 17:57:34 +02:00
Hans-Kristian Arntzen
2745959646
MSL: Deal with chained access chains for tessellation IO variables.
...
Need to specially deal with this since we might have to split up access
chain and deal with indexing into IB struct.
2019-10-26 17:26:56 +02:00
Hans-Kristian Arntzen
e1acbd3dcf
MSL: Declare struct type explicitly.
...
Disambiguates initializer list.
2019-10-26 16:21:46 +02:00
Hans-Kristian Arntzen
1fc3347873
MSL: Fix array of array declaration.
...
Arrays-of-arrays were declared in wrong order.
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
27d6d45671
MSL: Rewrite tessellation_access_chain.
...
To support loading array of array properly in tessellation, we need a
rewrite of how tessellation access chains are handled.
The major change is to remove the implicit unflatten step inside
access_chain which does not take into account the case where you load
directly from a control point array variable.
We defer unflatten step until OpLoad time instead.
This fixes cases where we load array of {array,matrix,struct}.
Removes the hacky path for MSL access chain index workaround.
2019-10-26 16:10:12 +02:00