SPIRV-Cross/reference/shaders-msl/comp
Chip Davis 058f1a0933 MSL: Handle coherent, volatile, and restrict.
This maps them to their MSL equivalents. I've mapped `Coherent` to
`volatile` since MSL doesn't have anything weaker than `volatile` but
stronger than nothing.

As part of this, I had to remove the implicit `volatile` added for
atomic operation casts. If the buffer is already `coherent` or
`volatile`, then we would add a second `volatile`, which would be
redundant. I think this is OK even when the buffer *doesn't* have
`coherent`: `T *` is implicitly convertible to `volatile T *`, but not
vice-versa. It seems to compile OK at any rate. (Note that the
non-`volatile` overloads of the atomic functions documented in the spec
aren't present in the MSL 2.2 stdlib headers.)

`restrict` is tricky, because in MSL, as in C++, it needs to go *after*
the asterisk or ampersand for the pointer type it's modifying.

Another issue is that, in the `Simple`, `GLSL450`, and `Vulkan` memory
models, `Restrict` is the default (i.e. does not need to be specified);
but MSL likely follows the `OpenCL` model where `Aliased` is the
default. We probably need to implicitly set either `Restrict` or
`Aliased` depending on the module's declared memory model.
2019-07-11 10:22:30 -05: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 MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02: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
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: Declare gl_WorkGroupSize constant with [[maybe_unused]]. 2019-03-28 10:54:18 +01:00
cfg-preserve-parameter.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05: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 MSL: Fix struct declaration order with complex type aliases. 2019-05-23 14:54:04 +02:00
composite-construct.comp MSL: Support copying array of arrays. 2018-09-12 09:54:55 +02:00
copy-array-of-arrays.comp MSL: Re-roll array expressions in initializers. 2019-07-10 11:19:33 +02:00
culling.comp MSL: Handle coherent, volatile, and restrict. 2019-07-11 10:22:30 -05:00
defer-parens.comp Enhance MSL testing and add numerous MSL test cases. 2017-01-30 22:55:21 -05:00
dowhile.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
force-recompile-hooks.swizzle.comp MSL: Implement OpArrayLength. 2019-05-27 16:13:09 +02:00
functions.comp Fix passing arrays of arrays to functions in MSL. 2018-01-29 10:57:52 +01:00
global-invocation-id-writable-ssbo-in-function.comp CompilerMSL map many GLSL functions to MSL functions. 2017-05-19 18:14:08 -04:00
global-invocation-id.comp CompilerMSL map many GLSL functions to MSL functions. 2017-05-19 18:14:08 -04: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 test files 2018-01-29 06:40:45 -08:00
insert.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -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 Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
local-invocation-id.comp CompilerMSL map many GLSL functions to MSL functions. 2017-05-19 18:14:08 -04:00
local-invocation-index.comp CompilerMSL map many GLSL functions to MSL functions. 2017-05-19 18:14:08 -04:00
mat3.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
mod.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02: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 Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05: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 MSL: Fix struct declaration order with complex type aliases. 2019-05-23 14:54:04 +02: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 MSL: Handle packed matrices. 2019-07-10 18:37:31 -05:00
torture-loop.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
type-alias.comp MSL: Fix struct declaration order with complex type aliases. 2019-05-23 14:54:04 +02:00
udiv.comp MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
writable-ssbo.comp CompilerMSL map many GLSL functions to MSL functions. 2017-05-19 18:14:08 -04:00