Commit Graph

174 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
1d63d14155 Run format_all.sh. 2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
7e02f7fd62 Check more places where we can potentially read phi variables. 2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
0758428b52 Pass down entry function in a cleaner way. 2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
0fd028147f Hoist all phi-local variables to entry block.
We don't have a mechanism to move temporaries to their appropriate
scope, and Phi behavior is weird enough that it will be a heroic effort
to not do this rather ugly codegen :(
2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
cdca192a56 Check for usage of phi variables as inputs to other phi variables. 2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
5b057f1ee1 More stringent checking for where Phi variables are used. 2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
bcdff2d2e1 Fixups for PR #338 review. 2017-11-22 20:51:26 +01:00
Lou Kramer
6671f52334 Add support for new extensions. 2017-11-22 19:05:38 +01:00
Hans-Kristian Arntzen
ce18d4ce74 Run format_all.sh. 2017-11-17 13:38:29 +01:00
Bill Hollings
e83e2b2217 CompilerMSL support and tests for OpUndef. 2017-11-15 22:44:42 -05:00
Hans-Kristian Arntzen
4427cb993d Add support for renaming entry points. 2017-11-13 13:50:37 +01:00
Hans-Kristian Arntzen
f486142e36 Run format_all.sh. 2017-11-13 09:52:35 +01:00
Bill Hollings
1014847f17 Fixes from review #3 of PR 321. 2017-11-10 16:40:33 -05:00
Bill Hollings
bac657d873 Fixes from review of PR 321. 2017-11-07 15:38:13 -05:00
Bill Hollings
42e718b77d Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-11-06 09:06:46 -05:00
Hans-Kristian Arntzen
ca69b614e5 Fix some warnings on older GCC. 2017-11-06 09:49:52 +01:00
Bill Hollings
ba865733eb Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-11-05 22:49:08 -05:00
Bill Hollings
1c18078811 Enhancements to MSL compute and entry point naming.
Support Workgroup (threadgroup) variables.
Mark if SPIRConstant is used as an array length, since it cannot be specialized.
Resolve specialized array length constants.
Support passing an array to MSL function.
Support emitting GLSL array assignments in MSL via an array copy function.
Support for memory and control barriers.
Struct packing enhancements, including packing nested structs.
Enhancements to replacing illegal MSL variable and function names.
Add Compiler::get_entry_point_name_map() function to retrieve entry point renamings.
Remove CompilerGLSL::clean_func_name() as obsolete.
Fixes to types in bitcast MSL functions.
Add Variant::get_id() member function.
Add CompilerMSL::Options::msl_version option.
Add numerous MSL compute tests.
2017-11-05 21:34:42 -05:00
Hans-Kristian Arntzen
94ff355812 Fix some naming issues for stripped and flattened structs. 2017-10-10 17:32:26 +02:00
Hans-Kristian Arntzen
1079e7930b Run format_all.sh. 2017-10-10 10:22:40 +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
153fed031d Add basic support for StorageClassStorageBuffer.
Needs more testing, but seems to work.
2017-09-28 13:29:57 +02:00
Hans-Kristian Arntzen
86eb874568 Implement specialization constants for work group sizes. 2017-09-28 11:33:30 +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
89bb31ac51 Remove some dead code. 2017-09-15 16:30:04 +02:00
Hans-Kristian Arntzen
a1c0ab67eb Fix variable scoping when dest block only uses OpPhi to read variable. 2017-08-21 09:36:53 +02:00
Hans-Kristian Arntzen
8d7a909c92 Add support for querying SPIR-V Capabilities and Extensions. 2017-08-15 15:27:53 +02:00
Hans-Kristian Arntzen
945425eaa8 Add some access chain tests. 2017-08-15 10:23:04 +02:00
Hans-Kristian Arntzen
e2bb5b8959 Add test for compute shader builtins. 2017-08-15 09:35:23 +02:00
Hans-Kristian Arntzen
7d7f4b3b50 Emit flattened loads and stores. 2017-08-15 09:15:23 +02:00
Hans-Kristian Arntzen
3cbdbec712 Begin implementing ByteAddressBuffer flattening for HLSL. 2017-08-15 09:15:23 +02:00
Bill Hollings
1e84a379ff Fix issue #245: assignment of flattened input struct.
Emit input struct assignment by assigning member by member from stage_in struct.
Map qualified member name from pointer type, not base type.
Add Comiler::expression_type_id() function, similar to expression_type().
2017-08-12 00:21:13 -04:00
Bill Hollings
77f5812c55 Fix issue #239: compilation of shaders-msl/frag/texture-proj-shadow.frag.
Remove unsupported sampler1DShadow from shaders-msl/frag/texture-proj-shadow.frag.
Improve error message response from unsupported depth texture formats.
Fix several integer cast warnings in unrelated code.
Run ./format_all.sh on unrelated files.
2017-08-11 14:54:58 -04:00
Bill Hollings
730257cf67 Merge upstream 2017-08-10 17:27:01 -04:00
Hans-Kristian Arntzen
744d0405b0 Preserve arguments with inout unless complete writes are made. 2017-08-09 17:06:41 +02:00
Hans-Kristian Arntzen
48ccde3779 Support OpConstantNull. 2017-08-03 14:32:29 +02:00
Hans-Kristian Arntzen
2abdc135c3 Declare undefined values up front.
They might potentially be used as part of OpStore in the SPIRV-Tools
inliner in some cases.

Implement these as declared variables but without any initializer.
2017-08-02 10:33:03 +02:00
Hans-Kristian Arntzen
818c1bea21 Fix spurious struct type aliasing in stripped binaries.
Should not consider aliasing when names are stripped.
2017-07-31 09:31:20 +02:00
Hans-Kristian Arntzen
f0c50a618d Fix parsing time explosion for huge shaders.
Need to prune already walked blocks.
2017-07-25 18:22:15 +02:00
Bill Hollings
5f42746389 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-06-30 19:11:46 -04:00
Bill Hollings
f591bc0d4a CompilerMSL enhancements.
Support BuiltInFragDepth.
Emit interface block for StorageClassUniformConstant.
Throw exception when output or fragment input structs contain matrix or array.
Dynamically created interface structs sorted by location number instead of alphabetically.
Add Compiler::is_array() function.
2017-06-30 19:10:46 -04:00
David Srbecky
a08b26926c Ignore debug instruction OpString
It may be used with OpLine or OpSource to specify filename.
2017-06-27 15:34:45 +01:00
Bill Hollings
6f3381a5d3 Fixes from review of PR #190. 2017-06-01 16:29:39 -04:00
Bill Hollings
b41e1482c8 Support emitting SPIR-V type declarations tuned for specified SPIR-V objects.
CompilerGLSL type_to_glsl() and image_type_glsl() functions support optional object ID.
Add SPIRType::Image::access member to support SPIR-V OpTypeImage access qualifier.
Remove SPIRType::Image::is_read and ::is_written members.
Use DecorationNonReadable and DecorationNonWritable to mark read/write access for image variables.
CompilerMSL emit access qualifiers per image variable, instead of per image type.
CompilerGLSL and CompilerHLSL behaviour is unchanged.
2017-05-29 20:45:05 -04:00
Bill Hollings
192bdc9516 CompilerMSL elide unused builtins from entry function input and output structs.
Add Compiler::has_active_builtin() function.
Update test reference shaders that included unused builtins.
2017-05-24 09:31:38 -04:00
Bill Hollings
c1b8154f2c CompilerMSL fix variables used in interface blocks aren't resolved correctly (#179). 2017-05-22 21:41:19 -04:00
Bill Hollings
94fdcecce9 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-05-22 11:57:25 -04:00
Hans-Kristian Arntzen
e5595270c7 Support SPIR-V 1.2.
It's the default with recent spirv-as, so be more friendly.
2017-05-22 13:59:58 +02:00
Bill Hollings
d677e63860 Merge with upstream 2017-05-19 19:36:24 -04:00