Commit Graph

1000 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
d4727fe696 Stamp out all variants for mod(). 2017-10-06 13:21:42 +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
52a33bf2a5 Merge pull request #297 from KhronosGroup/rename-interface-structs
Automatically rename structs as well in rename_interface_variable.
2017-10-06 13:02:55 +02:00
Hans-Kristian Arntzen
51e50c06c0 Automatically rename structs as well in rename_interface_variable. 2017-10-06 12:35:55 +02:00
Bill Hollings
9f06d909e4 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-10-05 12:57:30 -04:00
Hans-Kristian Arntzen
a2dc7d5645 Merge pull request #294 from KhronosGroup/fix-264
HLSL: Only unroll matrices for vertex input.
2017-10-05 17:17:00 +02:00
Hans-Kristian Arntzen
eb58f67727 Only unroll matrices for vertex input.
Bandaid, might have to revisit this later.
2017-10-05 16:31:52 +02:00
Bill Hollings
39c865ed0d Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-10-03 10:03:16 -04:00
Hans-Kristian Arntzen
03861274af Merge pull request #290 from KhronosGroup/storage-buffer
WIP: Specialization constant overhaul and StorageBuffer support
2017-10-03 09:14:20 +02:00
Bill Hollings
44347caff1 Add *.bc to .gitignore to ignore Xcode 9 intermediate compiled shader files.
spirv_msl.hpp use numeric_limits instead of UINT32_MAX.
2017-10-02 18:13:08 -04:00
Bill Hollings
bd021395f0 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-10-02 17:27:34 -04:00
Hans-Kristian Arntzen
067f241bf8 Runtime arrays do not work yet in MSL, so don't try to test that yet. 2017-10-02 09:24:16 +02:00
Hans-Kristian Arntzen
ecaea50739 Add SPVASM test from clspv. 2017-09-29 12:20:57 +02:00
Hans-Kristian Arntzen
aab3107a3f Add WorkGroupID/NumWorkGroups to MSL. Fix block name alias. 2017-09-29 12:16:53 +02:00
Hans-Kristian Arntzen
db5d49f04a Add SPVASM testing support for HLSL/MSL. 2017-09-29 11:07:11 +02:00
Hans-Kristian Arntzen
98b91e52f4 Run format_all.sh. 2017-09-29 10:52:04 +02:00
Hans-Kristian Arntzen
6583de8de7 ConstantID can be 0 for spec constants. 2017-09-29 10:33:28 +02:00
Hans-Kristian Arntzen
cff0fb57dc Add specialization constant work group size test for MSL. 2017-09-29 10:22:19 +02:00
Hans-Kristian Arntzen
825f07c04a Add test for specialization constant workgroup size on HLSL. 2017-09-29 10:21:02 +02:00
Hans-Kristian Arntzen
84f8c9935b Declare work group size constants in HLSL and MSL.
Technically not needed, but it does make compute code easier to read
compared to magical constants being used for work group size.
2017-09-29 10:15:33 +02:00
Hans-Kristian Arntzen
153fed031d Add basic support for StorageClassStorageBuffer.
Needs more testing, but seems to work.
2017-09-28 13:29:57 +02:00
Hans-Kristian Arntzen
fae64f032d Correctly resolve constant expressions for WorkGroupSize. 2017-09-28 12:34:48 +02:00
Hans-Kristian Arntzen
0e4ed4102b Only declare with specialization constant when in Vulkan semantics. 2017-09-28 12:24:04 +02:00
Hans-Kristian Arntzen
86eb874568 Implement specialization constants for work group sizes. 2017-09-28 11:33:30 +02:00
Hans-Kristian Arntzen
fd20b3f093 Merge pull request #289 from Wotan/master
Fix compilation with clang
2017-09-28 09:44:54 +02:00
Geoffroy Aubey
3a0b20fd71 Add compile options and compile defines to spirv-cross target. 2017-09-28 00:19:01 +02:00
Hans-Kristian Arntzen
ceefae5584 Support mixed constant composites. 2017-09-27 16:10:29 +02:00
Hans-Kristian Arntzen
5e1d6fb3ce Refactor constant construction. 2017-09-27 15:16:33 +02:00
Hans-Kristian Arntzen
d387ce99e8 Merge pull request #288 from KhronosGroup/fix-285
Fix case when Phi variable is a loop variable.
2017-09-25 10:30:27 +02:00
Hans-Kristian Arntzen
9175363839 Fix typo. 2017-09-25 10:16:45 +02:00
Hans-Kristian Arntzen
3339fd4e87 Fix case when Phi variable is a loop variable.
Need to flush variable to static expression rather than a variable.
2017-09-25 10:15:17 +02:00
Hans-Kristian Arntzen
860f8970e5 Merge pull request #286 from rossy/hlsl-atan2
Fix HLSL atan2() argument order
2017-09-25 09:07:10 +02:00
James Ross-Gowan
8805d08b31 Fix HLSL atan2() argument order
HLSL uses atan2(y, x) to represent the arctangent y/x, just like GLSL.

https://msdn.microsoft.com/en-us/library/windows/desktop/bb509575.aspx
2017-09-24 02:45:33 +10:00
Hans-Kristian Arntzen
7170864159 Merge pull request #284 from KhronosGroup/fix-283
Implement texture query APIs in HLSL
2017-09-20 15:11:33 +02:00
Hans-Kristian Arntzen
9aa42a87af Just emit textureSize variants we actually need. 2017-09-20 10:31:56 +02:00
Hans-Kristian Arntzen
1bc5b70752 Add exhaustive image query to HLSL.
Need to strip this down somehow ...
2017-09-20 10:00:13 +02:00
Hans-Kristian Arntzen
7c58f15928 Run format_all.sh. 2017-09-19 16:09:19 +02:00
Hans-Kristian Arntzen
7064c54820 Various fixes to texture/image query in GLSL. 2017-09-19 16:08:25 +02:00
Hans-Kristian Arntzen
68274c27da Merge pull request #282 from KhronosGroup/fix-281
Remove some dead code.
2017-09-16 10:28:56 +02:00
Hans-Kristian Arntzen
89bb31ac51 Remove some dead code. 2017-09-15 16:30:04 +02:00
Hans-Kristian Arntzen
41429901e8 Merge pull request #280 from rossy/sm-50-gather
Fix texture GatherRed/Green/etc. methods for HLSL SM 5.0
2017-09-12 08:48:29 +02:00
James Ross-Gowan
02e6be7288 Fix texture GatherRed/Green/etc. methods for SM 5.0
Unlike GLSL, the component is selected by calling a specific method.
2017-09-12 07:20:01 +10:00
Hans-Kristian Arntzen
0eaa2dee13 Merge pull request #279 from KhronosGroup/fix-276
Add option to disable use of 420pack extension.
2017-09-08 10:15:02 +02:00
Hans-Kristian Arntzen
fa5634164d Merge pull request #278 from KhronosGroup/fix-275
Ensure that exceptions are logged.
2017-09-08 09:57:02 +02:00
Hans-Kristian Arntzen
6599a41aad Add option to disable use of 420pack extension. 2017-09-08 09:56:06 +02:00
Hans-Kristian Arntzen
824d0ad8e7 Merge pull request #277 from KhronosGroup/pr-274
Merge PR #274 with Travis fixes
2017-09-08 09:35:26 +02:00
Hans-Kristian Arntzen
d9cbc03c9f Ensure that exceptions are logged. 2017-09-08 09:35:13 +02:00
Hans-Kristian Arntzen
eab66fcd55 Update HLSL references. 2017-09-08 09:14:00 +02:00
Hans-Kristian Arntzen
5aa5b08dd1 Merge branch 'sm-40-cbuffers' of git://github.com/rossy/SPIRV-Cross 2017-09-08 09:13:15 +02:00
James Ross-Gowan
fdbf794a67 Use the correct cbuffer binding for HLSL SM 4.0-5.0 2017-09-07 23:58:14 +10:00