| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct main0_out |
| 7 |
{ |
| 8 |
float4 gl_Position; |
| 9 |
}; |
| 10 |
|
| 11 |
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 spvStageInputSize [[grid_size]], uint3 spvDispatchBase [[grid_origin]], device main0_out* spvOut [[buffer(28)]]) |
| 12 |
{ |
| 13 |
device main0_out& out = spvOut[gl_GlobalInvocationID.y * spvStageInputSize.x + gl_GlobalInvocationID.x]; |
| 14 |
if (any(gl_GlobalInvocationID >= spvStageInputSize)) |
| 15 |
return; |
| 16 |
uint gl_BaseVertex = spvDispatchBase.x; |
| 17 |
uint gl_BaseInstance = spvDispatchBase.y; |
| 18 |
out.gl_Position = float4(float(int(gl_BaseVertex)), float(int(gl_BaseInstance)), 0.0, 1.0); |
| 19 |
} |
| 20 |
|