blob: f67c771f2de7b2524bf36333f0d0331a788efd9b [file] [log] [blame]
James Price61de3b82024-06-12 03:02:19 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 texture2d_array<float, access::read> arg_0;
5 device float4* prevent_dce;
6};
James Price2cc6b3c2024-06-13 20:31:41 +00007struct VertexOutput {
8 float4 pos;
9 float4 prevent_dce;
10};
James Price61de3b82024-06-12 03:02:19 +000011struct vertex_main_outputs {
James Price2cc6b3c2024-06-13 20:31:41 +000012 float4 VertexOutput_pos [[position]];
13 float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
James Price61de3b82024-06-12 03:02:19 +000014};
dan sinclairf1f381a2023-11-22 09:44:15 +000015
James Price2cc6b3c2024-06-13 20:31:41 +000016float4 textureLoad_ac64f7(tint_module_vars_struct tint_module_vars) {
James Price61de3b82024-06-12 03:02:19 +000017 uint2 arg_1 = uint2(1u);
18 uint arg_2 = 1u;
19 float4 res = tint_module_vars.arg_0.read(arg_1, arg_2);
James Price2cc6b3c2024-06-13 20:31:41 +000020 return res;
dan sinclairf1f381a2023-11-22 09:44:15 +000021}
James Price61de3b82024-06-12 03:02:19 +000022fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
23 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
James Price2cc6b3c2024-06-13 20:31:41 +000024 (*tint_module_vars.prevent_dce) = textureLoad_ac64f7(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000025}
James Price61de3b82024-06-12 03:02:19 +000026kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
27 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
James Price2cc6b3c2024-06-13 20:31:41 +000028 (*tint_module_vars.prevent_dce) = textureLoad_ac64f7(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000029}
James Price2cc6b3c2024-06-13 20:31:41 +000030VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
31 VertexOutput out = {};
32 out.pos = float4(0.0f);
33 out.prevent_dce = textureLoad_ac64f7(tint_module_vars);
34 return out;
35}
36vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
37 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
38 VertexOutput const v = vertex_main_inner(tint_module_vars);
39 return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
dan sinclairf1f381a2023-11-22 09:44:15 +000040}