SPIRV-Cross/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp
2019-09-24 14:35:25 -04:00

29 lines
431 B
Plaintext

#pragma clang diagnostic ignored "-Wmissing-prototypes"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO
{
float a;
};
struct SSBORead
{
float b;
};
static inline __attribute__((always_inline))
void copy_out(device float& A, device const float& B)
{
A = B;
}
kernel void main0(device SSBO& _7 [[buffer(0)]], const device SSBORead& _9 [[buffer(1)]])
{
copy_out(_7.a, _9.b);
}