Commit Graph

1001 Commits

Author SHA1 Message Date
Bill Hollings
a68b32733a CompilerMSL enhancements to nested function use of globals.
Allow function calls to include globals as arguments.
Allow function calls to include built-ins as arguments.
Include all meta info when creating function args from globals.
Do not manufacture a sampler for Buffer-type sampled images.
Add code option to test_shaders.py to preserve SPIR-V code for interactive debugging.
2017-12-26 16:32:45 -05:00
Bill Hollings
3fcdce08ab CompilerMSL support platform semantics.
Support customizing MSL based on iOS or macOS platform.
Support SPIV-V containing multiple memory semantics.
2017-12-26 13:39:07 -05:00
Hans-Kristian Arntzen
bcc96d8c70
Merge pull request #358 from zeux/master
msl generator enhancements/fixes
2017-12-13 20:01:09 +01:00
Vadim Shcherbakov
3376198740 and a bit better case placemenent 2017-12-13 13:03:31 +03:00
Vadim Shcherbakov
db402236a7 move BuiltInLayer to vertex out function block 2017-12-13 13:02:03 +03:00
Hans-Kristian Arntzen
fa27b56e26
Merge pull request #365 from KhronosGroup/fix-363
Validate HLSL output through FXC, fix various HLSL bugs.
2017-12-12 16:06:25 +01:00
Hans-Kristian Arntzen
51a48a7cef Always return win_path for FXC. 2017-12-12 13:33:13 +01:00
Hans-Kristian Arntzen
69e0935e1b Add current directory to PATH when running test scripts. 2017-12-12 13:28:15 +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
ffad50b3c2 Remove duplicate swizzles in remap_swizzle.
Makes HLSL image-load-store look much nicer.
2017-12-12 13:01:10 +01:00
Hans-Kristian Arntzen
1c7980a778 Swizzle scalars when splatting in HLSL. 2017-12-12 12:52:45 +01:00
Hans-Kristian Arntzen
950732512e Fix compatibility with FXC. 2017-12-12 12:35:22 +01:00
Vadim Shcherbakov
717d9fefd8 another formatting fix and a comment 2017-12-11 21:02:13 +03:00
Hans-Kristian Arntzen
f7b1ac2e6a
Merge pull request #364 from KhronosGroup/byteaddress-namespace
Use t-namespace for ByteAddressBuffer.
2017-12-11 15:04:50 +01:00
Hans-Kristian Arntzen
cc532cb7b6 Use t-namespace for ByteAddressBuffer.
FXC caught it, but not glslang, hm ...
2017-12-11 13:55:26 +01:00
Hans-Kristian Arntzen
918b451b7e Explicitly use Unix Makefiles when building on Windows. 2017-12-11 13:22:55 +01:00
Hans-Kristian Arntzen
3630d7ef75
Merge pull request #360 from KhronosGroup/vulkan-glsl-desktop-mediump
Support mediump in desktop Vulkan GLSL.
2017-12-07 17:40:14 +01:00
Hans-Kristian Arntzen
f586ef19ae
Merge pull request #361 from KhronosGroup/fix-348
Support VertexID/InstanceID in HLSL.
2017-12-07 15:26:51 +01:00
Vadim Shcherbakov
6c41f9e9da MSL improvements:
- pack/unpack nested constant buffer structs
- support for write-only textures (only global ones for now)
- better rt index support for msl generator
2017-12-06 09:52:07 -08:00
Hans-Kristian Arntzen
5e9b53e354 Support VertexID/InstanceID in HLSL. 2017-12-06 11:01:32 +01:00
Hans-Kristian Arntzen
2e68675ef7 Support mediump in desktop Vulkan GLSL. 2017-12-06 10:25:58 +01:00
Hans-Kristian Arntzen
ed461b44d9
Merge pull request #359 from KhronosGroup/fix-346
Lift dominator to loop header when continue block accesses variable
2017-12-06 09:49:36 +01:00
Hans-Kristian Arntzen
6d7af5c83c Add test for continue block lifting. 2017-12-05 17:44:52 +01:00
Hans-Kristian Arntzen
b737d2bc07 Lift variable accesses in continue blocks out to loop header. 2017-12-05 17:40:23 +01:00
Hans-Kristian Arntzen
adcda90d34
Merge pull request #357 from KhronosGroup/pr-353
Fixups for PR #353
2017-12-05 12:53:37 +01:00
Hans-Kristian Arntzen
e6ea63cdfd Add some convenience scripts for running tests. 2017-12-05 10:25:04 +01:00
Hans-Kristian Arntzen
aa2557c7df Fixups for PR #353. 2017-12-05 09:58:12 +01:00
Bill Hollings
12988801c4 Update reference shaders in reference/opt/shaders-msl.
Remove shaders-msl/comp/bake_gradient.comp, which now breaks spirv-opt.
2017-12-04 18:17:06 -05:00
Bill Hollings
5502b00682 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-12-04 17:02:08 -05:00
Hans-Kristian Arntzen
4a9d3cebd0
Merge pull request #355 from KhronosGroup/fix-345
Improve handling of block name declaration in GLSL.
2017-12-02 13:01:32 +01:00
Hans-Kristian Arntzen
197e5bd7fb
Merge pull request #356 from KhronosGroup/fix-352
Make sure image integer coords are int, not uint.
2017-12-02 12:59:31 +01:00
Hans-Kristian Arntzen
ed3afbac01
Merge pull request #354 from KhronosGroup/fix-344
Support textureQueryLod in HLSL.
2017-12-02 12:58:42 +01:00
Hans-Kristian Arntzen
3c52771aee Make sure image integer coords are int, not uint.
HLSL can emit uint here.
2017-12-01 15:02:50 +01:00
Hans-Kristian Arntzen
2c90ea3acc Improve handling of block name declaration in GLSL.
HLSL UAVs are a bit annoying because they can share block types,
so reflection becomes rather awkward. Sometimes we will need to make
some nasty fallbacks, so add a reflection interface which lets you query
post-shader compile which names was actually declared in the shader.
2017-12-01 14:30:10 +01:00
Hans-Kristian Arntzen
aeeb0e3dd0 Support textureQueryLod in HLSL. 2017-12-01 13:30:31 +01:00
Bill Hollings
c93d44ba3c For MSL, use {} instead of constructors to init OpUndef values. 2017-11-30 15:03:27 -05:00
Hans-Kristian Arntzen
a02b008ce0
Merge pull request #350 from KhronosGroup/fix-341
Fix various HLSL bugs.
2017-11-29 13:57:43 +01:00
Hans-Kristian Arntzen
975cf86892 Test textureProjLodOffset with compare in HLSL as well. 2017-11-29 12:48:06 +01:00
Hans-Kristian Arntzen
dbfa686990 Emit SampleCmpLevelZero for lod/grad variants of SampleCmp. 2017-11-29 12:38:13 +01:00
Hans-Kristian Arntzen
c65248fdce Support image load-store without format in HLSL. 2017-11-29 12:14:06 +01:00
Hans-Kristian Arntzen
c405274e38 Run format_all.sh. 2017-11-29 12:00:48 +01:00
Hans-Kristian Arntzen
48f3fa4adb Implement bitfield ops in HLSL. 2017-11-29 11:33:44 +01:00
Hans-Kristian Arntzen
7b73d135f7
Merge pull request #347 from KhronosGroup/fix-340
Add packing support to HLSL
2017-11-27 15:37:50 +01:00
Hans-Kristian Arntzen
e27f5775c5 Cannot support packDouble on HLSL, at least for now. 2017-11-27 15:06:15 +01:00
Hans-Kristian Arntzen
656af7e3ed Implement unorm16/snorm16 packing in HLSL. 2017-11-27 15:03:40 +01:00
Hans-Kristian Arntzen
719ba63416 Add pack/unpack snorm8/unorm8. 2017-11-27 14:49:47 +01:00
Hans-Kristian Arntzen
6c7c680d01 Implement FP16 unpack/pack on HLSL. 2017-11-27 14:24:30 +01:00
Hans-Kristian Arntzen
5989540f3e
Merge pull request #336 from KhronosGroup/fix-334
Add full testing for spirv-opt output.
2017-11-23 10:21:40 +01:00
Hans-Kristian Arntzen
c64c3de01f Add new optimized test shaders. 2017-11-23 09:59:25 +01:00
Hans-Kristian Arntzen
f929078f1e Disable --opt for in_block_assign for now.
Bug: OpLoad fails when loading an interface struct directly, followed by
OpCompositeExtract. This should be fixed, but not critical enough to
block this PR.
2017-11-23 09:59:25 +01:00