Hans-Kristian Arntzen
d94d20f4f3
Deal with some builtins being declared with wrong signedness.
2018-06-22 11:30:56 +02:00
Bill Hollings
ac57a30ad6
Regenerate MSL shaders to fix conflicts from merge.
2018-06-12 11:51:56 -04:00
Bill Hollings
ab2ea93e35
Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross
2018-06-12 11:42:56 -04:00
Bill Hollings
9b4defe202
CompilerMSL support matrices & arrays in stage-in & stage-out.
...
Support flattening StorageOutput & StorageInput matrices and arrays.
No longer move matrix & array inputs to separate buffer.
Add separate SPIRFunction::fixup_statements_in & SPIRFunction::fixup_statements_out
instead of just SPIRFunction::fixup_statements.
Emit SPIRFunction::fixup_statements at beginning of functions.
CompilerMSL track vars_needing_early_declaration.
Pass global output variables as variables to functions that access them.
Sort input structs by location, same as output structs.
Emit struct declarations in order output, input, uniforms.
Regenerate reference shaders to new formats defined by above.
2018-06-12 11:41:35 -04:00
Hans-Kristian Arntzen
58fab58e5e
Do not unpack transposed matrices.
2018-06-12 09:43:47 +02:00
Hans-Kristian Arntzen
192a882df3
Also unpack regular unary/binary operations on MSL.
...
Apparently MSL gets confused when you have packed_float3 op float3 ...
2018-06-11 16:23:09 +02:00
Hans-Kristian Arntzen
b86bd0a265
Unpack expressions when used in functions on MSL.
...
OSX 10.14 broke (?) how overload resolution works,
so overloading e.g. dot(float3, packed_float3) no longer works.
Fix this by unpacking expressions before various func ops.
This fix might need to be applied elsewhere, but do so later if needed.
2018-06-11 10:56:45 +02:00
Hans-Kristian Arntzen
04b149feb0
Fix image load/store on cube arrays in MSL.
2018-05-25 12:43:25 +02:00
Hans-Kristian Arntzen
f65120c147
Deal with packed expressions in more scenarios.
...
Make a new "to_extract_component_expression" helper.
2018-05-25 10:57:02 +02:00
Hans-Kristian Arntzen
280fb93204
Add test for reading SSBO from fragment shader on MSL.
2018-05-25 10:20:17 +02:00
Hans-Kristian Arntzen
6b3da831be
Declare read-only SSBOs as const device in MSL.
2018-05-25 10:14:05 +02:00
Hans-Kristian Arntzen
46bf17c5d3
Add SREM tests for HLSL/MSL.
2018-05-24 10:34:36 +02:00
Hans-Kristian Arntzen
bcaae84c76
Deal with scoping for Private variables.
2018-05-16 10:49:30 +02:00
Hans-Kristian Arntzen
26b887ec99
Fix atomic_compare_exchange_weak_explicit.
...
Need to emit a CAS loop.
Fix shared memory declaration.
Declare atomic ops with correct memory scope.
2018-05-15 16:04:21 +02:00
Hans-Kristian Arntzen
991b655c72
Declare OpSpecConstantOp up-front on relevant targets.
...
Required, since spec constants can include results from constant ops.
2018-05-15 14:20:16 +02:00
Hans-Kristian Arntzen
7eba247864
Handle inout properly with split access chains.
...
Found some other issues. Had some bugs with variable writes not properly
invalidating if writes came from split access chains.
2018-05-11 10:15:42 +02:00
Pascal Muetschard
aced6058b4
Don't limit GLSL identifiers with HLSL keywords.
...
- The HLSL compiler now has its own list of keywords in addition to
the ones from GLSL.
- Added "buffer", "precise", and "shared" to the GLSL keywords.
2018-05-07 10:58:52 -07:00
Hans-Kristian Arntzen
85a8f066f4
Do not use RMW rewrite for matrices.
...
Does not work on MSL.
2018-05-04 10:35:56 +02:00
Hans-Kristian Arntzen
d2df067dd4
Force recompile if we add row-major transpose functions in MSL.
2018-05-04 09:43:34 +02:00
Hans-Kristian Arntzen
3187d89c31
Reduce test case ... MSL can't deal with certain unusual cases yet.
2018-05-02 10:01:08 +02:00
Hans-Kristian Arntzen
f3e810b8b3
Fix OpCompositeConstruct with arrays in MSL.
2018-05-02 09:38:41 +02:00
Bill Hollings
57213cb7ca
Compiler MSL default gather offset when component specified.
2018-04-30 16:30:29 -04:00
Hans-Kristian Arntzen
47081f810a
Fix GatherDref on GLSL.
2018-04-30 12:45:23 +02:00
Hans-Kristian Arntzen
d93807a625
Deal with OpImageFetch without explicit LOD.
2018-04-30 10:54:44 +02:00
Hans-Kristian Arntzen
aaf397cd1f
Fix usage tracking issue for OpImage.
2018-04-27 11:11:24 +02:00
Hans-Kristian Arntzen
0280800a8f
Fix case where SampledImage would get flushed to temporary.
2018-04-27 10:06:30 +02:00
Hans-Kristian Arntzen
146ea76f52
Add test shader for subgroup.
...
Update SPIRV-Tools/glslang commits.
Use vulkan1.1 environment for testing.
Found new "errors" in SPIRV-Tools, so disable validation on those shaders
for now.
2018-04-11 10:29:47 +02:00
Hans-Kristian Arntzen
8175e2e200
Fix depth compare textures when used in functions without argument.
2018-04-10 12:31:13 +02:00
Hans-Kristian Arntzen
694b314f87
Support empty structs.
...
Need to fake it by pretending it has one dummy member.
2018-04-05 16:26:54 +02:00
Hans-Kristian Arntzen
ac81a0ce68
Use declared binding in SPIR-V as a fallback for explicit MSL binds.
2018-04-04 12:25:11 +02:00
Hans-Kristian Arntzen
e8ca39b7b5
Add test for sampler image arrays.
2018-04-04 09:41:20 +02:00
Hans-Kristian Arntzen
81eb72a9a0
Ignore LOD when sampling 1D textures in MSL.
...
Not supported.
2018-04-04 09:26:53 +02:00
Hans-Kristian Arntzen
65be63fd04
Merge pull request #521 from KhronosGroup/fix-516
...
Support dual-source blending on GLSL and MSL.
2018-04-03 16:54:32 +02:00
Hans-Kristian Arntzen
a6e211e00b
Support dual-source blending on GLSL and MSL.
2018-04-03 16:04:49 +02:00
Hans-Kristian Arntzen
3229e6efb6
Add more illegal name replacement in MSL.
2018-04-03 15:36:35 +02:00
Hans-Kristian Arntzen
8e90382675
Properly flatten MRT outputs in MSL.
2018-03-13 14:03:35 +01:00
Hans-Kristian Arntzen
6e6ca0b237
Attempt MRT-as-array in MSL.
2018-03-13 13:17:17 +01:00
Hans-Kristian Arntzen
b46910e9f5
Access chain into packed vectors as arrays.
...
Cleaner and should be more compatible with storing to packed vector
elements.
Fix CompositeExtract bug with packed vectors on MSL.
2018-03-13 12:13:33 +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
Hans-Kristian Arntzen
4979d10b54
Implement packHalf2x16/unpackHalf2x16 on MSL.
2018-03-12 17:51:14 +01:00
Hans-Kristian Arntzen
938c7debed
Handle control-dependent temporaries.
...
Derivatives, subgroup and implicit-lod instructions all need to happen
in the block they were created.
2018-03-12 17:34:54 +01:00
Hans-Kristian Arntzen
9fbd8b789e
Update tests for latest SPIRV-Tools and glslang.
2018-03-12 15:11:55 +01:00
Hans-Kristian Arntzen
e3b8e9455c
Add test shader where a phi variable invalidates a temporary.
...
The temporary in question is used to flush a phi variable.
2018-03-09 14:42:26 +01:00
Hans-Kristian Arntzen
e0efa737ca
Expand the implementation of inherit_expression_dependencies.
2018-03-09 13:21:38 +01:00
Hans-Kristian Arntzen
922420e346
Disallow arrays and structs from becoming loop variables.
...
Fixes awkward code-gen issue.
2018-03-07 14:54:11 +01:00
Hans-Kristian Arntzen
bdabd0c73a
Disable double test in MSL FP16 tests.
2018-03-07 11:36:26 +01:00
Hans-Kristian Arntzen
18ad1be3c3
Add FP16 test for MSL as well.
2018-03-07 10:29:11 +01:00
Hans-Kristian Arntzen
38d9d8af68
Add some more MSL test shaders.
2018-03-05 16:42:38 +01:00
Hans-Kristian Arntzen
5fe79eb59c
Update tests.
...
Adds an earlier reported shader packing failure into regression suite.
2018-03-05 16:34:42 +01:00
Hans-Kristian Arntzen
6a12ff7fb7
Fix multiple declaration of spvDet2x2 on MSL.
2018-02-23 16:52:11 +01:00