SPIRV-Cross/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp
Hans-Kristian Arntzen c37f88fea6 MSL: Fix crash where variable storage buffer pointers are passed down.
Only deal with readonly decoration for actual block types.
2019-03-28 10:16:46 +01:00

28 lines
386 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;
};
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);
}