1#include <metal_stdlib> 2#include <simd/simd.h> 3 4using namespace metal; 5 6struct SSBO2 7{ 8 float4 out_data[1]; 9}; 10 11constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); 12 13kernel void main0(device SSBO2& _27 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) 14{ 15 uint ident = gl_GlobalInvocationID.x; 16 if (ident == 2u) 17 { 18 _27.out_data[ident] = float4(20.0); 19 } 20 else 21 { 22 if (ident == 4u) 23 { 24 _27.out_data[ident] = float4(10.0); 25 return; 26 } 27 } 28 for (int i = 0; i < 20; i++) 29 { 30 if (i == 10) 31 { 32 break; 33 } 34 return; 35 } 36 _27.out_data[ident] = float4(10.0); 37} 38 39