SPIRV-Cross/reference/opt/shaders-msl/asm/comp/multiple-entry.asm.comp
Hans-Kristian Arntzen 2a49f7e82d MSL: Fix restrict vs __restrict incompatibility.
restrict was supported, but it broke in MSL 3.0. __restrict works on all
versions, so opt for that instead.

Also check for RestrictPointer decoration and refactor to_restrict() to
not take optional parameter to make it more obvious when implied space
character is added.
2022-10-26 17:52:47 +02:00

30 lines
544 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct _6
{
int4 _m0;
uint4 _m1;
};
struct _7
{
uint4 _m0;
int4 _m1;
};
kernel void main0(device _6& __restrict _8 [[buffer(0)]], device _7& __restrict _9 [[buffer(1)]])
{
_9._m0 = _8._m1 + uint4(_8._m0);
_9._m0 = uint4(_8._m0) + _8._m1;
_9._m0 = _8._m1 + _8._m1;
_9._m0 = uint4(_8._m0 + _8._m0);
_9._m1 = int4(_8._m1 + _8._m1);
_9._m1 = _8._m0 + _8._m0;
_9._m1 = int4(_8._m1) + _8._m0;
_9._m1 = _8._m0 + int4(_8._m1);
}