Hans-Kristian Arntzen
b380a2113a
Implement MatrixInverse on HLSL.
...
Copy-paste implementation from MSL. I assume it's correct.
2018-02-23 16:42:40 +01:00
Hans-Kristian Arntzen
f6d08e6113
Add workaround for PointCoord builtin on HLSL.
2018-02-23 15:58:35 +01:00
Hans-Kristian Arntzen
dd603eab58
Support spec constant array size in blocks.
...
Won't really be correct if the spec constant is changed outside
SPIRV-Cross, but nothing we can do about that, really.
2018-02-23 15:11:45 +01:00
Hans-Kristian Arntzen
a04bdcc7f7
Handle overloaded functions which share the same OpName.
...
Awkward, but legal SPIR-V.
2018-02-23 14:15:51 +01:00
Hans-Kristian Arntzen
047ad7df0f
Support special float constants (NaN/Inf).
2018-02-23 13:06:20 +01:00
Hans-Kristian Arntzen
0673f27b7c
Fix incorrect loop range.
2018-02-22 17:00:41 +01:00
Hans-Kristian Arntzen
114c2c5e37
Add clip/cull-distance support to HLSL.
2018-02-22 16:40:04 +01:00
Hans-Kristian Arntzen
fb3f92a3ff
Overhaul clip/cull distance support in GLSL.
2018-02-22 14:36:50 +01:00
Bill Hollings
50ef6cd95f
CompilerMSL remove incorrect packing of non-interface type-aliased structs.
2018-02-21 17:52:03 -05:00
Hans-Kristian Arntzen
1a2e4de7a5
Add test for texelFetch without sampler.
2018-02-21 13:45:59 +01:00
Hans-Kristian Arntzen
8a3bef2bd6
Add OpFRem tests.
2018-02-15 13:36:59 +01:00
Hans-Kristian Arntzen
843e34b604
Add IsFrontFace support to HLSL.
2018-02-15 12:42:56 +01:00
Hans-Kristian Arntzen
636cc30088
Fix case where hoisted temporaries were used before being declared.
2018-02-15 10:52:56 +01:00
Bill Hollings
2964e328e6
CompilerMSL support gl_SampleMask and convert it to scalar uint from array.
2018-02-13 14:44:40 -05:00
Bill Hollings
b453348370
Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross
2018-02-11 16:54:25 -05:00
Bill Hollings
607b0d6d42
CompilerMSL support smaller offsets for 3-row row-major matrices.
...
Support MSL typedefs to declare 3-row row-major matrices as 3-column matrices.
Allow those matrices to be decorated as packed.
Support transposing those matrices when used.
Modify how member alignments are calculated.
2018-02-11 16:52:57 -05:00
Hans-Kristian Arntzen
a3ae861844
Fix depth image usage in MSL for separate image/samplers.
2018-02-10 10:55:10 +01:00
Hans-Kristian Arntzen
702e08671b
Support passing implicit frag_coord arguments down to functions.
2018-02-10 10:55:09 +01:00
Hans-Kristian Arntzen
18a594a76b
Implement subpass input support in HLSL.
2018-02-10 10:54:42 +01:00
Hans-Kristian Arntzen
c9db3e5521
Overload on constant storage.
2018-02-08 17:58:46 +01:00
Hans-Kristian Arntzen
b2c9487b0f
Attempt to deduce constant/thread storage.
2018-02-08 17:07:50 +01:00
Hans-Kristian Arntzen
1a9c960058
MSL cannot declare inline arrays except in certain cases.
2018-02-08 13:06:29 +01:00
Hans-Kristian Arntzen
00ccd590ee
Return arrays in HLSL/MSL by writing to an output variable instead.
2018-02-08 12:22:08 +01:00
Hans-Kristian Arntzen
9fa91f7e1c
Support returning arrays from functions in GLSL/MSL.
...
Not possible in HLSL apparently, need workaround ...
2018-02-08 12:22:08 +01:00
Hans-Kristian Arntzen
18e8833eeb
Support gl_NumWorkgroups in HLSL.
2018-02-05 10:29:20 +01:00
Hans-Kristian Arntzen
5d9df6a31c
Do not declare constant composites inline in HLSL.
...
Move arrays and structs out to their own global static constants.
Also, replace illegal names in HLSL as well.
2018-02-02 10:12:26 +01:00
Hans-Kristian Arntzen
8841f15283
Fix case where loop header branches into continue block.
2018-02-01 10:00:16 +01:00
Hans-Kristian Arntzen
988f00fe3c
Fix OpImage on OpSampledImages in HLSL.
2018-02-01 09:22:16 +01:00
Hans-Kristian Arntzen
d1399f01ab
Update reference file after merge.
2018-02-01 09:14:45 +01:00
Hans-Kristian Arntzen
4c1e57ee03
Merge pull request #413 from zeux/master
...
MSL: Order resources by type and binding index in the output
2018-02-01 09:01:34 +01:00
Arseny Kapoulkine
5cbed7a69f
Update test files
2018-01-29 06:40:45 -08:00
Hans-Kristian Arntzen
38b8f733d1
Fix passing arrays of arrays to functions in MSL.
2018-01-29 10:57:52 +01:00
Hans-Kristian Arntzen
6714a9fa23
Need to sort declared temporaries to ensure stable output.
2018-01-29 10:24:15 +01:00
Bill Hollings
e43f244399
Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross
2018-01-24 17:34:50 -05:00
Bill Hollings
fe3683eefa
CompilerMSL declare threadgroup variables accessed in called functions.
2018-01-24 15:38:17 -05:00
Hans-Kristian Arntzen
b3f6e3de8e
Fix CFG::update_common_dominator.
...
The algorithm was too conservative causing lots of unnecessary
temporaries to be created.
2018-01-24 20:32:11 +01:00
Hans-Kristian Arntzen
09f550f718
Handle exponential explosion of code-gen during first phase of compile.
...
Certain patterns with OpVectorShuffle (and probably others) will cascade
to so large, that they can cause OOM. After we have observed
force_recompile, don't spend unnecessary memory emitting code which will
never be used.
2018-01-24 18:12:41 +01:00
Hans-Kristian Arntzen
af0a887997
Add test for false loop init.
...
Clean up how for loop variables are declared.
2018-01-23 21:15:09 +01:00
Hans-Kristian Arntzen
56acf9728a
Merge pull request #406 from KhronosGroup/fix-405
...
Fix HLSL regression with struct declaration.
2018-01-23 16:54:13 +01:00
Hans-Kristian Arntzen
06041985d0
Fix HLSL regression with struct declaration.
...
It actually worked surprisingly. Fix it properly.
2018-01-23 16:36:20 +01:00
Hans-Kristian Arntzen
d0ce948df4
Do not merge swizzles for anything other than vectors.
2018-01-22 09:52:57 +01:00
Hans-Kristian Arntzen
7d223b8987
Fix CFG for forwarded temporaries.
...
Forwarded temporaries would never declare a temporary.
Figure out all result types ahead of time so we can deal with those
temporaries as well.
2018-01-18 12:11:33 +01:00
Hans-Kristian Arntzen
b902d5400c
Do not use inline for-loop initializers with different types.
2018-01-16 10:27:58 +01:00
Hans-Kristian Arntzen
168bcc7b3b
Add unreachable tests for MSL/HLSL.
2018-01-15 09:39:15 +01:00
Hans-Kristian Arntzen
0f4adaa09d
Handle OpUnreachable in code-gen.
...
Forgot to add it to emit_block_chain. It should just be a noop.
2018-01-15 09:35:09 +01:00
Hans-Kristian Arntzen
d4e470babd
Analyze the CFG for temporaries as well.
...
Normally, temporary declaration must dominate any use of it,
so we generally did not need to analyze the CFG for these variables,
but there is an edge case where you have an inliner doing:
do {
create_temporary;
break;
} while(0);
use_temporary;
The inside of the loop dominates the outer scope, but we cannot emit
code like this in GLSL, so make sure we hoist these temporaries outside
the "loop".
2018-01-12 10:56:11 +01:00
Hans-Kristian Arntzen
39e7ddea94
Disable mem_texture checks on MSL.
...
Doesn't seem to work on Travis even though spec says it should, oh well
:)
2018-01-09 14:09:29 +01:00
Hans-Kristian Arntzen
cfe568f237
Add exhaustive barrier tests for MSL.
...
Seems incorrect, need to be fixed later.
2018-01-09 12:55:46 +01:00
Hans-Kristian Arntzen
9c3d4e7c60
Rewrite barrier handling in HLSL.
2018-01-09 12:41:13 +01:00
Hans-Kristian Arntzen
27ad8c0922
Add more exhaustive test for barrier handling.
2018-01-09 12:26:46 +01:00