SPIRV-Cross/shaders-msl/comp
Bill Hollings 16fbf8872a MSL: Workaround Metal 3.1 regression bug on recursive input structs.
Metal 3.1 introduced a Metal regression bug which causes an infinite recursion
crash during Metal's analysis of an entry point input structure that itself
contains internal recursion. This patch works around this by replacing the
recursive input declaration with a alternate variable of type void*, and
then casting to the correct type at the top of the entry point function.

- Add CompilerMSL::Options::replace_recursive_inputs to enable
  replacing recursive input.
- Add Compiler::type_contains_recursion() to determine if a struct
  contains internal recursion, and add custom Decorations to mark
  such structs, to short-cut future similar checks.
- Replace recursive input struct declarations with void*,
  and emit a recast to correct type at top of entry function.
- Add unit test.
- Compiler::type_is_top_level_block() remove hardcode reference to spirv_cross
  namespace, as it interferes with configurable namespaces (unrelated).
2023-10-14 14:46:47 -04:00
..
access-private-workgroup-in-function.comp Deal with scoping for Private variables. 2018-05-16 10:49:30 +02:00
argument-buffers-discrete.msl2.argument.discrete.comp Rename "push descriptor set" to "discrete descriptor set". 2019-03-15 21:53:21 +01:00
argument-buffers-image-load-store.ios.msl2.argument.comp MSL: Force storage images on iOS to use discrete descriptors. 2019-09-05 11:01:05 -05:00
argument-buffers-image-load-store.msl2.argument.comp MSL: Implement Metal 2.0 indirect argument buffers. 2019-03-15 11:01:27 +01:00
array-length.comp MSL: Implement OpArrayLength. 2019-05-27 16:13:09 +02:00
array-length.msl2.argument.discrete.comp OpArrayLength must trigger active variables. 2019-05-27 16:44:02 +02:00
atomic-float.msl3.comp added tests and added msl3 to test_shaders.py 2023-02-15 00:04:44 -08:00
atomic.comp Fix atomic_compare_exchange_weak_explicit. 2018-05-15 16:04:21 +02:00
barriers.comp MSL: Add support for subgroup operations. 2019-05-15 17:40:04 -05:00
basic.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
basic.dispatchbase.comp MSL: Adjust BuiltInWorkgroupId for vkCmdDispatchBase(). 2019-07-24 08:56:15 -05:00
basic.dispatchbase.msl11.comp MSL: Adjust BuiltInWorkgroupId for vkCmdDispatchBase(). 2019-07-24 08:56:15 -05:00
basic.inline-block.msl2.comp MSL: Support inline uniform blocks in argument buffers. 2020-01-24 18:51:24 -06:00
buffer_device_address-packed-vec-and-cast-to-and-from-uvec2.msl23.comp MSL: Fixes from review for SPV_KHR_physical_storage_buffer extension. 2022-07-01 16:10:41 -04:00
buffer_device_address-recursive-struct-pointers.msl23.comp MSL: Fixes from review for SPV_KHR_physical_storage_buffer extension. 2022-07-01 16:10:41 -04:00
buffer_device_address.msl2.comp MSL: Add support for SPV_KHR_physical_storage_buffer extension. 2022-06-20 20:21:00 -04:00
builtins.comp Add WorkGroupID/NumWorkGroups to MSL. Fix block name alias. 2017-09-29 12:16:53 +02:00
cfg-preserve-parameter.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
coherent-block.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
coherent-image.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
complex-composite-constant-array.comp MSL: Do not declare complex composite array in main for non-inlined. 2019-10-24 11:12:01 +02:00
complex-type-alias.comp MSL: Add test case for complex type alias. 2019-05-23 15:05:30 +02:00
composite-array-initialization.comp Add test shader for composite array initialization. 2018-09-10 10:05:00 +02:00
composite-array-initialization.force-native-array.comp MSL: Add native array test for composite array initialization. 2020-02-24 13:34:51 +01:00
composite-construct.comp Reduce test case ... MSL can't deal with certain unusual cases yet. 2018-05-02 10:01:08 +02:00
copy-array-of-arrays.comp MSL: Support array-of-arrays composite construction. 2018-09-12 10:25:51 +02:00
copy-array-of-arrays.force-native-array.comp MSL: Add a workaround path to force native arrays for everything. 2020-02-24 12:47:14 +01:00
culling.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
defer-parens.comp Enhance MSL testing and add numerous MSL test cases. 2017-01-30 22:55:21 -05:00
dowhile.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
force-recompile-hooks.swizzle.comp MSL: Hoist fixup hooks in entry_point_args() out of the compile loop. 2019-01-17 10:18:38 -06:00
functions.comp CompilerMSL declare threadgroup variables accessed in called functions. 2018-01-24 15:38:17 -05:00
global-invocation-id-writable-ssbo-in-function.comp Add SSBO and gl_GlobalInvocationID MSL tests 2017-01-26 20:12:00 -05:00
global-invocation-id.comp Add SSBO and gl_GlobalInvocationID MSL tests 2017-01-26 20:12:00 -05:00
image-atomic-automatic-bindings.argument.msl2.comp MSL: Support atomic access to images from argument buffers. 2020-10-13 02:37:18 -05:00
image-atomic-automatic-bindings.comp MSL: Fix automatic binding allocation for image atomic buffers. 2019-11-28 11:07:44 +01:00
image-cube-array-load-store.comp Fix image load/store on cube arrays in MSL. 2018-05-25 12:43:25 +02:00
image.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
insert.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
inverse.comp Fix multiple declaration of spvDet2x2 on MSL. 2018-02-23 16:52:11 +01:00
local-invocation-id.comp msl: Add support for gl_LocalInvocationID and gl_LocalInvocationIndex 2017-01-26 20:22:31 -05:00
local-invocation-index.comp msl: Add support for gl_LocalInvocationID and gl_LocalInvocationIndex 2017-01-26 20:22:31 -05:00
local-size-duplicate-spec-id.comp MSL: Deduplicate function constants. 2023-02-17 10:43:50 -08:00
mat3-row-maj-read-write-const.comp MSL: Support row-major transpose when storing matrix from constant RHS matrix. 2021-08-12 09:08:35 -04:00
mat3.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
metal3_1_regression_patch.replace-recursive-inputs.msl3.comp MSL: Workaround Metal 3.1 regression bug on recursive input structs. 2023-10-14 14:46:47 -04:00
mod.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
modf.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
outer-product.comp MSL/HLSL: Support OpOuterProduct. 2019-07-01 10:57:27 +02:00
packing-test-1.comp Add some more MSL test shaders. 2018-03-05 16:42:38 +01:00
packing-test-2.comp Add some more MSL test shaders. 2018-03-05 16:42:38 +01:00
raw-buffer-descriptor-aliasing.argument.discrete.device-argument-buffer.msl2.comp MSL: Do not attempt to alias push constants. 2022-09-21 11:01:42 +02:00
raw-buffer-descriptor-aliasing.argument.discrete.msl2.comp MSL: Do not attempt to alias push constants. 2022-09-21 11:01:42 +02:00
ray-query.spv14.vk.ios.msl24..invalid.comp Update dependencies. 2022-09-02 14:58:04 +02:00
read-write-only.comp Enhance MSL testing and add numerous MSL test cases. 2017-01-30 22:55:21 -05:00
rmw-matrix.comp Do not use RMW rewrite for matrices. 2018-05-04 10:35:56 +02:00
rmw-opt.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
scalar-std450-distance-length-normalize.comp Fix #1445: MSL: Enclose args when convert distance(a,b) to abs(a-b) 2020-08-13 21:16:08 +08:00
shader_ballot.msl22.comp MSL: Support SPV_KHR_shader_ballot and SPV_KHR_subgroup_vote. 2023-06-24 15:53:04 -07:00
shader_group_vote.msl21.comp MSL: Support SPV_KHR_shader_ballot and SPV_KHR_subgroup_vote. 2023-06-24 15:53:04 -07:00
shared-array-of-arrays.comp Fix passing arrays of arrays to functions in MSL. 2018-01-29 10:57:52 +01:00
shared-matrix-array-of-array.comp MSL: Use a wrapper type for matrices in workgroup storage. 2022-08-07 17:31:41 -07:00
shared-matrix-cast.comp MSL: Use a wrapper type for matrices in workgroup storage. 2022-08-07 17:31:41 -07:00
shared-matrix-nested-struct-array.comp MSL: Use a wrapper type for matrices in workgroup storage. 2022-08-07 17:31:41 -07:00
shared-matrix-nested-struct.comp MSL: Use a wrapper type for matrices in workgroup storage. 2022-08-07 17:31:41 -07:00
shared-struct-bool-cast.comp MSL: Also replace bool with short in structures. 2022-08-05 11:43:21 -07:00
shared.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
spec-constant-op-member-array.comp Deal with OpSpecConstantOp used as array size. 2018-11-01 14:58:02 +01:00
spec-constant-work-group-size.comp Add test case for local_size_x_id and some complex cases. 2018-11-01 11:23:48 +01:00
storage-buffer-std140-vector-array.comp Add basic test for std140 small vector arrays. 2019-01-17 11:29:09 +01:00
struct-layout.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
struct-nested.comp CompilerMSL remove incorrect packing of non-interface type-aliased structs. 2018-02-21 17:52:03 -05:00
struct-packing.comp CompilerMSL support smaller offsets for 3-row row-major matrices. 2018-02-11 16:52:57 -05:00
threadgroup-boolean-workaround.comp MSL: Workaround compiler crashes when using threadgroup bool. 2021-10-25 10:55:11 +02:00
torture-loop.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
type_casting_i64.msl22.comp MSL: Add test for fixes to MSL constant expression type down-casting. 2021-08-16 13:56:05 -04:00
type-alias.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
udiv.comp Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
writable-ssbo.comp Add SSBO and gl_GlobalInvocationID MSL tests 2017-01-26 20:12:00 -05:00