James Price | 61de3b8 | 2024-06-12 03:02:19 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | using namespace metal; |
James Price | 48be7e8 | 2024-06-19 22:38:07 +0000 | [diff] [blame] | 3 | |
James Price | 61de3b8 | 2024-06-12 03:02:19 +0000 | [diff] [blame] | 4 | struct tint_module_vars_struct { |
James Price | 61de3b8 | 2024-06-12 03:02:19 +0000 | [diff] [blame] | 5 | device uint4* prevent_dce; |
James Price | 812c9d0 | 2024-06-29 21:54:00 +0000 | [diff] [blame] | 6 | texture3d<uint, access::read_write> arg_0; |
James Price | 61de3b8 | 2024-06-12 03:02:19 +0000 | [diff] [blame] | 7 | }; |
dan sinclair | f1f381a | 2023-11-22 09:44:15 +0000 | [diff] [blame] | 8 | |
James Price | 2cc6b3c | 2024-06-13 20:31:41 +0000 | [diff] [blame] | 9 | uint4 textureLoad_622278(tint_module_vars_struct tint_module_vars) { |
James Price | 61de3b8 | 2024-06-12 03:02:19 +0000 | [diff] [blame] | 10 | uint4 res = tint_module_vars.arg_0.read(uint3(int3(1))); |
James Price | 2cc6b3c | 2024-06-13 20:31:41 +0000 | [diff] [blame] | 11 | return res; |
dan sinclair | f1f381a | 2023-11-22 09:44:15 +0000 | [diff] [blame] | 12 | } |
James Price | 48be7e8 | 2024-06-19 22:38:07 +0000 | [diff] [blame] | 13 | |
James Price | 812c9d0 | 2024-06-29 21:54:00 +0000 | [diff] [blame] | 14 | fragment 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 Price | 2cc6b3c | 2024-06-13 20:31:41 +0000 | [diff] [blame] | 16 | (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars); |
dan sinclair | f1f381a | 2023-11-22 09:44:15 +0000 | [diff] [blame] | 17 | } |
James Price | 48be7e8 | 2024-06-19 22:38:07 +0000 | [diff] [blame] | 18 | |
James Price | 812c9d0 | 2024-06-29 21:54:00 +0000 | [diff] [blame] | 19 | kernel 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 Price | 2cc6b3c | 2024-06-13 20:31:41 +0000 | [diff] [blame] | 21 | (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars); |
dan sinclair | f1f381a | 2023-11-22 09:44:15 +0000 | [diff] [blame] | 22 | } |