Commit Graph

2491 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
ba4b31e46f MSL: Fall back to GLSL path for non-invariant FP implementation. 2019-10-24 11:34:52 +02:00
Hans-Kristian Arntzen
6edbf0c9e9 MSL: Minor cleanups for texture atomic emulation.
Storing pointers to internal objects is generally not done, IDs are
preferred.
2019-10-24 11:30:20 +02:00
Hans-Kristian Arntzen
43842cefb3 MSL: Cleanup decoration forwarding for SampleMask.
Don't want to create Meta instances unless we have to.
2019-10-24 11:15:35 +02:00
Hans-Kristian Arntzen
db55d474f9 MSL: Do not declare complex composite array in main for non-inlined.
Need to consider that complex composite arrays may be used in leaf
functions, and avoid the MSL library link fix unless everything is
nicely inlined.
2019-10-24 11:12:01 +02:00
Hans-Kristian Arntzen
8ad9584c2e Fix formatting in main.cpp. 2019-10-24 10:56:36 +02:00
Hans-Kristian Arntzen
b1fd6c1990 Add new UE4 folders to CMake testing as well. 2019-10-24 10:54:32 +02:00
Lukas Hermanns
c236ca4572 Moved all UE4 test shaders into 'shaders-ue4/' folder. 2019-10-23 17:39:05 -04:00
Lukas Hermanns
b0d616aa6d Removed 'argument_buffer_offset' and fixed packed matrix Metal output. 2019-10-23 16:28:32 -04:00
Lukas Hermanns
6673a675ba Simplified overriding of 'access_chain_internal' function in CompilerMSL. 2019-10-22 11:06:16 -04:00
Lukas Hermanns
84351d3aed Merge remote-tracking branch 'upstream/master' 2019-10-21 18:55:36 -04:00
Lukas Hermanns
e1b161b54b Removed bounds checks in favor of SPIRV-Tools pass '--graphics-robust-access' 2019-10-21 16:39:53 -04:00
Hans-Kristian Arntzen
ff1897ae0e
Merge pull request #1181 from KhronosGroup/cfg-immediate-dominators
CFG: Compute actual immediate dominators.
2019-10-21 13:46:09 +02:00
Hans-Kristian Arntzen
7be1e51b5a CFG: Compute actual immediate dominators.
This wasn't really a visible bug, since the DominatorBuilder would resolve this
issue, but it is still a bug.
2019-10-21 10:58:25 +02:00
Hans-Kristian Arntzen
a92668bc11
Merge pull request #1179 from KhronosGroup/fix-1178
Fix OpVectorExtractDynamic with spec constant op index.
2019-10-17 13:03:35 +02:00
Hans-Kristian Arntzen
4550f18b37 Fix OpVectorExtractDynamic with spec constant op index.
We cannot lower this to a swizzle, keep it dynamically indexed.
2019-10-17 11:12:14 +02:00
Hans-Kristian Arntzen
87dffb7231
Merge pull request #1177 from KhronosGroup/travis-python-roll
Travis: Update PATH for Python3 on Windows.
2019-10-16 09:26:13 +02:00
Hans-Kristian Arntzen
b8952c4567 Travis: Update PATH for Python3 on Windows.
Version was updated to 3.8, so need to change the custom PATH.
2019-10-16 00:36:14 +02:00
Hans-Kristian Arntzen
4d6a223cbe
Merge pull request #1175 from KhronosGroup/fix-1164
Implement unordered compare on GLSL/HLSL.
2019-10-14 19:01:00 +02:00
Hans-Kristian Arntzen
4acfcb3822
Merge pull request #1174 from KhronosGroup/fix-1170
MSL: Add opt-in support for huge IABs.
2019-10-14 19:00:41 +02:00
Lukas Hermanns
2482ff708c Merge remote-tracking branch 'upstream/master' 2019-10-14 11:06:15 -04:00
Hans-Kristian Arntzen
4bb673a626 MSL: Add opt-in support for huge IABs.
If there are enough members in an IAB, we cannot use the constant
address space as MSL compiler complains about there being too many
members. Support emitting the device address space instead.
2019-10-14 16:20:34 +02:00
Hans-Kristian Arntzen
a9be92569f HLSL: Fix unrolled S/G LE/LT/GE/GT opcodes.
Need to bitcast the unrolled expressions as well.
2019-10-14 16:08:39 +02:00
Hans-Kristian Arntzen
3bf9fa7ed6 GLSL: Deal correctly with bitwidth on integer compares. 2019-10-14 15:23:38 +02:00
Hans-Kristian Arntzen
b960ae3b70 HLSL: Partially implement Unordered compare.
We cannot correctly implement unordered equal/ordered not equal without
a lot of extra instructions which slows normal code down.
2019-10-14 15:15:03 +02:00
Hans-Kristian Arntzen
14a4b087fb GLSL: Support unordered floating point compare.
There is no direct way to express this, so invert boolean results to
force any NaN -> true. glslang emits Ordered compare instructions
everywhere, and the GLSL spec is not clear on this, so assume this is
fine.
2019-10-14 13:48:22 +02:00
Hans-Kristian Arntzen
7cc84020b3
Merge pull request #1173 from KhronosGroup/fix-1172
MSL: Fix regression with OpCompositeConstruct from std140 float[].
2019-10-11 11:58:14 +02:00
Hans-Kristian Arntzen
07e9501ae1 MSL: Fix regression with OpCompositeConstruct from std140 float[].
Simple fix, just need to use to_unpacked_expression rather than to_expression here to
deal with this.
2019-10-11 11:21:43 +02:00
Lukas Hermanns
0853bcaee1 Disabled spvUnsafeArray<> type for packed vectors and added test cases for those arrays. 2019-10-09 17:59:47 -04:00
Lukas Hermanns
ffbd801853 Added '--msl-invariant-float-math' option and new test case for it. 2019-10-09 14:03:06 -04:00
Lukas Hermanns
688a39e7f8 Merge remote-tracking branch 'upstream/master' 2019-10-09 10:12:04 -04:00
Hans-Kristian Arntzen
e5d3a6655e
Merge pull request #1169 from zoddicus/updateSPV_VERSION
Update SPV_VERSION from 1.4 to 1.5
2019-10-07 19:47:59 +02:00
Ryan Harrison
2d1e20d8f3 Update SPV_VERSION from 1.4 to 1.5
Missed this when I did the update to tests and such for 1.5.
2019-10-07 13:37:45 -04:00
Hans-Kristian Arntzen
43f7618194
Merge pull request #1168 from KhronosGroup/fix-1167
Do not consider aliased struct types if the master is not a block
2019-10-07 13:41:26 +02:00
Hans-Kristian Arntzen
f59688b5d1 Workaround MSVC issue. 2019-10-07 12:40:21 +02:00
Hans-Kristian Arntzen
a0c13e4ee8 Do not consider aliased struct types if the master is not a block.
It is possible for a shader to declare two plain struct types which
simply share the same OpName without there being an implicit
value/buffer alias relationship.

For to_member_name(), make sure to use the type alias master when
resolving member names. The member name may be different in a type alias
master if the SPIR-V is being intentionally difficult.
2019-10-07 10:52:16 +02:00
Hans-Kristian Arntzen
2d20b1ab93 Run format_all.sh. 2019-10-07 10:29:04 +02:00
Hans-Kristian Arntzen
f5e6a5476f
Merge pull request #1166 from KhronosGroup/workgroup-size-spec-constant-reflect
Merge workgroup size support for JSON reflection
2019-10-04 15:51:44 +02:00
Hans-Kristian Arntzen
309e994224 Do not value compare JSON files for regression purposes.
0 was comparing equal to False. We expect text equality.
2019-10-04 11:04:52 +02:00
Hans-Kristian Arntzen
43e89bd269 Reflect: Deal with workgroup size being specialization constants. 2019-10-04 10:50:50 +02:00
Hans-Kristian Arntzen
1a20737af7 Merge branch 'reflect-workgroup_size' of git://github.com/res2k/SPIRV-Cross 2019-10-04 10:24:59 +02:00
Frank Richter
6bb2cf8bb0 reference: Update to include workgroup_size 2019-10-03 17:06:30 +02:00
Frank Richter
227a004b57 reflection: Write workgroup_size to JSON for compute shaders 2019-10-03 16:36:17 +02:00
Lukas Hermanns
f3a6d28a1d Further updates for pull request #1162; also added two test cases for spvCubemapTo2DArrayFace function and added '--msl-framebuffer-fetch'/ '--msl-emulate-cube-array' compiler options. 2019-09-27 15:49:54 -04:00
Lukas Hermanns
c3d6022956 Update for pull request #1162 rev. 1 2019-09-24 18:13:04 -04:00
Lukas Hermanns
7ad0a84778 Updates for pull request #1162 2019-09-24 14:35:25 -04:00
Lukas Hermanns
37df74035b Merge branch 'ue4_dev' 2019-09-20 09:42:42 -04:00
Lukas Hermanns
9f9276f5ce Fixed false-positive optimization of builtin variables (may happen when 'spvOut' is emitted). 2019-09-19 14:44:30 -04:00
Hans-Kristian Arntzen
5431e1da2d
Merge pull request #1161 from KhronosGroup/roll-deps-merge
Merge dependency update
2019-09-19 10:41:43 +02:00
Hans-Kristian Arntzen
02c34fe575 Update SPIR-V headers. 2019-09-19 10:26:04 +02:00
Hans-Kristian Arntzen
3c11254ece MSL: Fix 16-bit integer literals.
There is no suffix, so bitcasts failed.
2019-09-19 10:19:51 +02:00