| 1 |
#pragma clang diagnostic ignored "-Wmissing-prototypes" |
| 2 |
|
| 3 |
#include <metal_stdlib> |
| 4 |
#include <simd/simd.h> |
| 5 |
|
| 6 |
using namespace metal; |
| 7 |
|
| 8 |
struct main0_out |
| 9 |
{ |
| 10 |
float4 MRT0 [[color(0)]]; |
| 11 |
float4 MRT1 [[color(1)]]; |
| 12 |
uint gl_FragStencilRefARB [[stencil]]; |
| 13 |
}; |
| 14 |
|
| 15 |
static inline __attribute__((always_inline)) |
| 16 |
void update_stencil(thread uint& gl_FragStencilRefARB) |
| 17 |
{ |
| 18 |
gl_FragStencilRefARB = uint(int(gl_FragStencilRefARB) + 10); |
| 19 |
} |
| 20 |
|
| 21 |
fragment main0_out main0() |
| 22 |
{ |
| 23 |
main0_out out = {}; |
| 24 |
out.MRT0 = float4(1.0); |
| 25 |
out.MRT1 = float4(1.0, 0.0, 1.0, 1.0); |
| 26 |
out.gl_FragStencilRefARB = uint(100); |
| 27 |
update_stencil(out.gl_FragStencilRefARB); |
| 28 |
return out; |
| 29 |
} |
| 30 |
|