1#include <metal_stdlib> 2#include <simd/simd.h> 3 4using namespace metal; 5 6struct SSBO 7{ 8 float4x4 mvp; 9 float4 in_data[1]; 10}; 11 12struct SSBO2 13{ 14 float4 out_data[1]; 15}; 16 17constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); 18 19kernel void main0(const device SSBO& _28 [[buffer(0)]], device SSBO2& _52 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) 20{ 21 uint ident = gl_GlobalInvocationID.x; 22 int i = 0; 23 float4 idat = _28.in_data[ident]; 24 do 25 { 26 idat = _28.mvp * idat; 27 i++; 28 } while (i < 16); 29 _52.out_data[ident] = idat; 30} 31 32