Commit Graph

2419 Commits

Author SHA1 Message Date
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
Hans-Kristian Arntzen
470fd76fd4 Merge branch 'rollDEPS' of git://github.com/zoddicus/SPIRV-Cross 2019-09-19 09:52:17 +02:00
Ryan Harrison
cf1bf1c6ae Update external/ to SPIR-V 1.5
Rolled the hashes used for glslang, SPIRV-Tools, and SPIRV-Headers to
HEAD, which includes the update to 1.5.

Added passing '--amb' to glslang, so I didn't have to explicitly set
bindings in a large number of test shaders that currently don't, and
now glslang considers them invalid.

Marked all shaders that no longer pass spirv-val as .invalid.
2019-09-18 16:04:27 -04:00
Lukas Hermanns
744cc3e595 Updated test shaders. 2019-09-18 14:18:22 -04:00
Lukas Hermanns
50ac6862ac Rearranged all 'UE Change' comments to match to project's coding style. 2019-09-18 14:03:54 -04:00
Hans-Kristian Arntzen
d821a90091
Merge pull request #1159 from KhronosGroup/fix-1157
CMake: Add option to force -fPIC.
2019-09-18 11:41:11 +02:00
Hans-Kristian Arntzen
467d970704 CMake: Add option to force -fPIC.
Used by projects who might embed SPIRV-Cross as part of a shared
library, but not exported.
2019-09-18 10:00:25 +02:00
Lukas Hermanns
137e9d6d98 Removed reference specifiers in 'spvFMul*' functions to avoid address specifiers. 2019-09-17 16:50:33 -04:00
Lukas Hermanns
cb3ecb9e1b Updated reference Metal shaders. 2019-09-17 15:11:19 -04:00
Lukas Hermanns
51be601922 Avoid emitting 'spvUnsafeArray<>', 'spvFMul*', and 'spvFAdd' custom functions if they are not needed. 2019-09-17 15:10:39 -04:00
Lukas Hermanns
36eab88b23 Further adjustments to make Metal backend work again in UE4 on Mac. 2019-09-17 11:40:01 -04:00
Hans-Kristian Arntzen
87a3d4cf44
Merge pull request #1156 from KhronosGroup/fix-1155
Disable -Werror by default in CMake, fix -Wshorten-64-to-32 warnings.
2019-09-17 12:39:13 +02:00
Hans-Kristian Arntzen
c3ff67c3f0 Fix -Wshorten-64-to-32 warnings. 2019-09-17 10:18:38 +02:00
Lukas Hermanns
0be20cd933 Renamed new test shaders to fit the naming convention in SPIRV-Cross. 2019-09-16 10:33:45 -04:00
Hans-Kristian Arntzen
f20011733a
Merge pull request #1154 from KhronosGroup/fix-1153
CMake: Add option to skip installation targets.
2019-09-16 11:40:17 +02:00
Hans-Kristian Arntzen
9b9ea1fac6 CMake: Add option to skip installation targets. 2019-09-16 10:21:28 +02:00
Lukas Hermanns
7cf5d4f7a1 Added a new 'emulate_cube_array' option to SPIRV-Cross to cope with translating TextureCubeArray into texture2d_array for iOS where this type is not available. (Original Author: Mark Satterthwaite) 2019-09-13 17:24:27 -04:00
Lukas Hermanns
9573faa56d Removed all '.DS_Store' files. 2019-09-13 14:04:32 -04:00
Lukas Hermanns
a9f3c981d9 Adjustments after rebase of ue4_dev branch. 2019-09-13 14:03:02 -04:00
Hans-Kristian Arntzen
c13e951634
Merge pull request #1152 from KhronosGroup/fix-1151
Consider discard and demote as impure statements.
2019-09-12 15:12:29 +02:00
Mark Satterthwaite
c4f9704af0 OpImageTexelPointer needs to use an int coordinate type for GLSL, but not for MSL. 2019-09-12 08:52:08 -04:00
Mark Satterthwaite
fdaf9b47bd Remove obsolete memory barrier scope specification from Metal output, this API has been removed. 2019-09-12 08:35:28 -04:00
Mark Satterthwaite
69b703f1da Add an option to SPIRV-Cross to enforce invariant floating point math to prevent different depth calculation between prepass & basepass when running on Metal 2.0 and earlier. 2019-09-12 08:35:15 -04:00