| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct SSBO |
| 7 |
{ |
| 8 |
float4 in_data[1]; |
| 9 |
}; |
| 10 |
|
| 11 |
struct SSBO2 |
| 12 |
{ |
| 13 |
float4 out_data[1]; |
| 14 |
}; |
| 15 |
|
| 16 |
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); |
| 17 |
|
| 18 |
kernel void main0(const device SSBO& _23 [[buffer(0)]], device SSBO2& _35 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) |
| 19 |
{ |
| 20 |
float4 i; |
| 21 |
float4 _31 = modf(_23.in_data[gl_GlobalInvocationID.x], i); |
| 22 |
_35.out_data[gl_GlobalInvocationID.x] = _31; |
| 23 |
} |
| 24 |
|