SPIRV-Cross/reference/shaders-msl/comp/read-write-only.comp
Hans-Kristian Arntzen e2c95bdcbc MSL: Rewrite how resource indices are fallback-assigned.
We used to use the Binding decoration for this, but this method is
hopelessly broken. If no explicit MSL resource remapping exists, we
remap automatically in a manner which should always "just work".
2019-06-21 12:54:08 +02:00

30 lines
443 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO2
{
float4 data4;
float4 data5;
};
struct SSBO0
{
float4 data0;
float4 data1;
};
struct SSBO1
{
float4 data2;
float4 data3;
};
kernel void main0(device SSBO2& _10 [[buffer(0)]], const device SSBO0& _15 [[buffer(1)]], device SSBO1& _21 [[buffer(2)]])
{
_10.data4 = _15.data0 + _21.data2;
_10.data5 = _15.data1 + _21.data3;
}