2019-06-12 08:06:59 +00:00
|
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
|
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
|
|
|
struct main0_out
|
|
|
|
{
|
|
|
|
float4 MRT0 [[color(0)]];
|
|
|
|
float4 MRT1 [[color(1)]];
|
|
|
|
uint gl_FragStencilRefARB [[stencil]];
|
|
|
|
};
|
|
|
|
|
2019-09-17 19:11:19 +00:00
|
|
|
static inline __attribute__((always_inline))
|
|
|
|
void update_stencil(thread uint& gl_FragStencilRefARB)
|
2019-06-12 08:06:59 +00:00
|
|
|
{
|
|
|
|
gl_FragStencilRefARB = uint(int(gl_FragStencilRefARB) + 10);
|
|
|
|
}
|
|
|
|
|
|
|
|
fragment main0_out main0()
|
|
|
|
{
|
|
|
|
main0_out out = {};
|
|
|
|
out.MRT0 = float4(1.0);
|
|
|
|
out.MRT1 = float4(1.0, 0.0, 1.0, 1.0);
|
|
|
|
out.gl_FragStencilRefARB = uint(100);
|
|
|
|
update_stencil(out.gl_FragStencilRefARB);
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|