blob: 59df37edf33c45e28e99a7ebb1185f6951d45c97 [file] [log] [blame]
James Price456cf282024-06-11 18:24:06 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 texture2d_array<float, access::write> arg_0;
5 device uint2* prevent_dce;
6};
7struct vertex_main_outputs {
8 float4 tint_symbol [[position]];
9};
dan sinclairf1f381a2023-11-22 09:44:15 +000010
James Price456cf282024-06-11 18:24:06 +000011void textureDimensions_867ead(tint_module_vars_struct tint_module_vars) {
12 uint const v = tint_module_vars.arg_0.get_width(0u);
13 uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
14 (*tint_module_vars.prevent_dce) = res;
dan sinclairf1f381a2023-11-22 09:44:15 +000015}
James Price456cf282024-06-11 18:24:06 +000016float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
17 textureDimensions_867ead(tint_module_vars);
18 return float4(0.0f);
dan sinclairf1f381a2023-11-22 09:44:15 +000019}
James Price456cf282024-06-11 18:24:06 +000020fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* 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};
22 textureDimensions_867ead(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000023}
James Price456cf282024-06-11 18:24:06 +000024kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* 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};
26 textureDimensions_867ead(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000027}
James Price456cf282024-06-11 18:24:06 +000028vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
29 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
30 return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
dan sinclairf1f381a2023-11-22 09:44:15 +000031}