Hans-Kristian Arntzen
62db535b3f
Update tests.
2018-11-01 11:23:48 +01:00
Hans-Kristian Arntzen
6157bf3cae
Add Windows support in Travis CI.
...
- Add new Windows support
- Use CMake/CTest instead of Make + shell scripts
- Use --parallel in CTest
- Fix CTest on Windows
- Cleanups in test_shaders.py
- Force specific commit for SPIRV-Headers
- Fix Inf/NaN odd-ball case by moving to ASM
2018-10-27 00:22:30 +02:00
Hans-Kristian Arntzen
226d837d7e
HLSL: Use same logic as GLSL for picking cbuffer block name.
...
HLSL just picked the variable name which did not work as expected for
some users. Use the same logic as GLSL and set up declared_block_names,
so the actual name can be queried later.
2018-10-22 09:50:04 +02:00
Hans-Kristian Arntzen
737715214e
Implement atomic increment/decrement in GLSL and HLSL.
2018-09-17 15:54:21 +02:00
Hans-Kristian Arntzen
87de951105
MSL: Fix naming issue of aliased global variables.
...
When the name of an alias global variable collides with a global
declaration, MSL would emit inconsistent names, sometimes with the
naming fix, sometimes without, because names were being tracked in two
separate meta blocks. Fix this by always redirecting parameter naming to
the original base variable as necessary.
2018-08-27 09:59:55 +02:00
Hans-Kristian Arntzen
361fe52c9d
MSL: Properly support passing parameters by value.
...
MSL would force thread const& which would not work if the input argument
came from a different storage class.
Emit proper non-reference arguments for such values.
2018-08-06 15:43:51 +02:00
Hans-Kristian Arntzen
18b82caf83
Properly track read dependencies for UAV access chain.
2018-07-09 14:02:50 +02:00
Hans-Kristian Arntzen
dcddd5326e
Add LUT test cases for OpVariable with initializer.
2018-07-05 14:51:07 +02:00
Hans-Kristian Arntzen
e044732896
Support OpTypeImage with depth == 2 (unknown) properly.
...
Track which OpSampledImages are ever used with Dref opcodes.
2018-07-04 14:26:23 +02:00
Hans-Kristian Arntzen
33c61d2abe
Support branch/loop hints in HLSL.
2018-06-25 10:33:13 +02:00
Hans-Kristian Arntzen
d94d20f4f3
Deal with some builtins being declared with wrong signedness.
2018-06-22 11:30:56 +02:00
Hans-Kristian Arntzen
46bf17c5d3
Add SREM tests for HLSL/MSL.
2018-05-24 10:34:36 +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
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
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
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
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
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
8a3bef2bd6
Add OpFRem tests.
2018-02-15 13:36:59 +01: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
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
168bcc7b3b
Add unreachable tests for MSL/HLSL.
2018-01-15 09:39:15 +01:00
Hans-Kristian Arntzen
23f0abf112
Update tests for struct flattening.
2018-01-09 10:40:34 +01:00
Hans-Kristian Arntzen
789fa91987
Support running FXC on Unix-likes as well.
...
Assumes a wine wrapper script is set up, but should be good enough.
2017-12-12 13:23:56 +01:00
Hans-Kristian Arntzen
1c7980a778
Swizzle scalars when splatting in HLSL.
2017-12-12 12:52:45 +01:00
Hans-Kristian Arntzen
5e9b53e354
Support VertexID/InstanceID in HLSL.
2017-12-06 11:01:32 +01:00
James Ross-Gowan
1f16f0d260
Use 'static const' for spec constants in HLSL
...
If 'const' is used, the shader expects the variable to be backed by a
constant buffer. 'static const' is probably preferred for a value that
is initialized with a constant in the HLSL source code.
FXC also emits a warning for 'const' variables with initializers, since
'static const' was probably intended.
2017-10-21 19:19:32 +11:00
Hans-Kristian Arntzen
d48876ac41
Add test for stripped cbuffer members.
2017-10-10 17:40:37 +02:00
Hans-Kristian Arntzen
8538b4c9c0
Handle empty struct declarations with best effort.
...
This "feature" is a bit icky as we have no useful representation of it,
so never emit code which has anything to do with empty structs.
2017-10-06 13:05:14 +02:00
Hans-Kristian Arntzen
ecaea50739
Add SPVASM test from clspv.
2017-09-29 12:20:57 +02:00
Hans-Kristian Arntzen
db5d49f04a
Add SPVASM testing support for HLSL/MSL.
2017-09-29 11:07:11 +02:00