blob: 3d4a2a9c590b25f7ab258f6607418fd25c71a7a2 [file] [log] [blame]
James Price61de3b82024-06-12 03:02:19 +00001#include <metal_stdlib>
2using namespace metal;
James Price48be7e82024-06-19 22:38:07 +00003
James Price61de3b82024-06-12 03:02:19 +00004struct tint_module_vars_struct {
James Price61de3b82024-06-12 03:02:19 +00005 device uint4* prevent_dce;
James Price812c9d02024-06-29 21:54:00 +00006 texture3d<uint, access::read_write> arg_0;
James Price61de3b82024-06-12 03:02:19 +00007};
dan sinclairf1f381a2023-11-22 09:44:15 +00008
James Price2cc6b3c2024-06-13 20:31:41 +00009uint4 textureLoad_622278(tint_module_vars_struct tint_module_vars) {
James Price61de3b82024-06-12 03:02:19 +000010 uint4 res = tint_module_vars.arg_0.read(uint3(int3(1)));
James Price2cc6b3c2024-06-13 20:31:41 +000011 return res;
dan sinclairf1f381a2023-11-22 09:44:15 +000012}
James Price48be7e82024-06-19 22:38:07 +000013
James Price812c9d02024-06-29 21:54:00 +000014fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
15 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
James Price2cc6b3c2024-06-13 20:31:41 +000016 (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000017}
James Price48be7e82024-06-19 22:38:07 +000018
James Price812c9d02024-06-29 21:54:00 +000019kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
20 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
James Price2cc6b3c2024-06-13 20:31:41 +000021 (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000022}