blob: d674498532b80ffba0f63a4ca62748b1500a28ff [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
depth2d_ms<float, access::read> arg_0;
thread float4* tint_symbol_1;
};
struct vertex_main_out {
float4 tint_symbol_1_1;
};
struct vertex_main_outputs {
float4 vertex_main_out_tint_symbol_1_1 [[position]];
};
void textureLoad_6273b1(tint_module_vars_struct tint_module_vars) {
float res = 0.0f;
uint2 const v = (uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height()) - uint2(1u));
res = float4(tint_module_vars.arg_0.read(min(uint2(int2(0)), v), 1), 0.0f, 0.0f, 0.0f).x;
}
void tint_symbol_2(float4 tint_symbol, tint_module_vars_struct tint_module_vars) {
(*tint_module_vars.tint_symbol_1) = tint_symbol;
}
void vertex_main_1(tint_module_vars_struct tint_module_vars) {
textureLoad_6273b1(tint_module_vars);
tint_symbol_2(float4(0.0f), tint_module_vars);
}
vertex_main_out vertex_main_inner(tint_module_vars_struct tint_module_vars) {
vertex_main_1(tint_module_vars);
return vertex_main_out{.tint_symbol_1_1=(*tint_module_vars.tint_symbol_1)};
}
void fragment_main_1(tint_module_vars_struct tint_module_vars) {
textureLoad_6273b1(tint_module_vars);
}
fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
fragment_main_1(tint_module_vars);
}
void compute_main_1(tint_module_vars_struct tint_module_vars) {
textureLoad_6273b1(tint_module_vars);
}
kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
compute_main_1(tint_module_vars);
}
vertex vertex_main_outputs vertex_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
thread float4 tint_symbol_1 = float4(0.0f);
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .tint_symbol_1=(&tint_symbol_1)};
vertex_main_outputs tint_wrapper_result = {};
tint_wrapper_result.vertex_main_out_tint_symbol_1_1 = vertex_main_inner(tint_module_vars).tint_symbol_1_1;
return tint_wrapper_result;
}