blob: 5b5c5ef4d88b1c8b2cc754e4138fd1b8d5e91754 [file] [log] [blame]
James Price61de3b82024-06-12 03:02:19 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 texture1d<int, access::read> arg_0;
5 device int4* prevent_dce;
6};
James Price2cc6b3c2024-06-13 20:31:41 +00007struct VertexOutput {
8 float4 pos;
9 int4 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 int4 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 +000016int4 textureLoad_33d3aa(tint_module_vars_struct tint_module_vars) {
James Price61de3b82024-06-12 03:02:19 +000017 int4 res = tint_module_vars.arg_0.read(1u);
James Price2cc6b3c2024-06-13 20:31:41 +000018 return res;
dan sinclairf1f381a2023-11-22 09:44:15 +000019}
James Price61de3b82024-06-12 03:02:19 +000020fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
21 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 +000022 (*tint_module_vars.prevent_dce) = textureLoad_33d3aa(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000023}
James Price61de3b82024-06-12 03:02:19 +000024kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
25 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 +000026 (*tint_module_vars.prevent_dce) = textureLoad_33d3aa(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000027}
James Price2cc6b3c2024-06-13 20:31:41 +000028VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
29 VertexOutput out = {};
30 out.pos = float4(0.0f);
31 out.prevent_dce = textureLoad_33d3aa(tint_module_vars);
32 return out;
33}
34vertex vertex_main_outputs vertex_main(texture1d<int, access::read> arg_0 [[texture(0)]]) {
35 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
36 VertexOutput const v = vertex_main_inner(tint_module_vars);
37 return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
dan sinclairf1f381a2023-11-22 09:44:15 +000038}