SPIRV-Cross/reference/opt/shaders-msl/comp
Chip Davis cb35934248 MSL: Support dynamic offsets for buffers in argument buffers.
Vulkan has two types of buffer descriptors,
`VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC` and
`VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC`, which allow the client to
offset the buffers by an amount given when the descriptor set is bound
to a pipeline. Metal provides no direct support for this when the buffer
in question is in an argument buffer, so once again we're on our own.
These offsets cannot be stored or associated in any way with the
argument buffer itself, because they are set at bind time.  Different
pipelines may have different offsets set. Therefore, we must use a
separate buffer, not in any argument buffer, to hold these offsets. Then
the shader must manually offset the buffer pointer.

This change fully supports arrays, including arrays of arrays, even
though Vulkan forbids them. It does not, however, support runtime
arrays. Perhaps later.
2019-09-05 23:29:00 -05:00
..
access-private-workgroup-in-function.comp MSL: Fix declaration of unused input variables. 2019-05-31 13:23:34 +02:00
argument-buffers-discrete.msl2.argument.discrete.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02: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: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
array-length.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
array-length.msl2.argument.discrete.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
atomic.comp MSL: Handle coherent, volatile, and restrict. 2019-07-11 10:22:30 -05:00
barriers.comp MSL: Add support for subgroup operations. 2019-05-15 17:40:04 -05:00
basic.comp MSL: Handle coherent, volatile, and restrict. 2019-07-11 10:22:30 -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.dynamic-buffer.msl2.comp MSL: Support dynamic offsets for buffers in argument buffers. 2019-09-05 23:29:00 -05:00
bitcast-16bit-1.invalid.comp Always value-cast FP16 constants instead of using literals. 2019-02-20 12:30:01 +01:00
bitcast-16bit-2.invalid.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
builtins.comp MSL: Fix declaration of unused input variables. 2019-05-31 13:23:34 +02:00
cfg-preserve-parameter.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
coherent-block.comp MSL: Handle coherent, volatile, and restrict. 2019-07-11 10:22:30 -05:00
coherent-image.comp MSL: Handle coherent, volatile, and restrict. 2019-07-11 10:22:30 -05: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 Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
composite-construct.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
copy-array-of-arrays.comp MSL: Support array-of-arrays composite construction. 2018-09-12 10:25:51 +02:00
culling.comp MSL: Handle coherent, volatile, and restrict. 2019-07-11 10:22:30 -05:00
defer-parens.comp Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
dowhile.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
force-recompile-hooks.swizzle.comp MSL: Add support for sampler Y'CbCr conversion. 2019-09-01 18:35:53 -05:00
functions.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
global-invocation-id-writable-ssbo-in-function.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
global-invocation-id.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12: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 Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
insert.comp Update reference shaders in reference/opt/shaders-msl. 2017-12-04 18:17:06 -05:00
int64.invalid.msl22.comp MSL: Error out on int64_t/uint64_t buffer members. 2019-06-19 10:14:46 +02:00
inverse.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
local-invocation-id.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
local-invocation-index.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
mat3.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
mod.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00
modf.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
outer-product.comp MSL/HLSL: Support OpOuterProduct. 2019-07-01 10:57:27 +02:00
packing-test-1.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
packing-test-2.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
read-write-only.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
rmw-matrix.comp Do not use RMW rewrite for matrices. 2018-05-04 10:35:56 +02:00
rmw-opt.comp Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
scalar-std450-distance-length-normalize.comp Deal with scalar input values for distance/length/normalize. 2019-06-28 11:20:14 +02:00
shared-array-of-arrays.comp MSL: Declare gl_WorkGroupSize constant with [[maybe_unused]]. 2019-03-28 10:54:18 +01:00
shared.comp MSL: Declare gl_WorkGroupSize constant with [[maybe_unused]]. 2019-03-28 10:54:18 +01:00
spec-constant-op-member-array.comp Update to latest glslang/SPIRV-Tools. 2019-01-30 13:41:57 +01:00
spec-constant-work-group-size.comp MSL: Declare gl_WorkGroupSize constant with [[maybe_unused]]. 2019-03-28 10:54:18 +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 MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
struct-nested.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
struct-packing.comp Simplify row-major matrix/vector multiplies. 2019-07-23 10:56:57 +02:00
torture-loop.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
type-alias.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
udiv.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
writable-ssbo.comp Update tests to account for all non-entry-point functions being inlined 2019-08-30 09:39:06 +12:00