Ben Clayton | b07a7ce | 2021-06-03 11:26:17 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
James Price | 9fd3bef | 2021-06-04 17:31:48 +0000 | [diff] [blame] | 4 | struct tint_symbol { |
| 5 | float4 value [[position]]; |
| 6 | }; |
| 7 | |
Ben Clayton | b07a7ce | 2021-06-03 11:26:17 +0000 | [diff] [blame] | 8 | void sign_dd790e() { |
Ben Clayton | f24b37e | 2021-06-28 15:30:57 +0000 | [diff] [blame] | 9 | float res = sign(1.0f); |
Ben Clayton | b07a7ce | 2021-06-03 11:26:17 +0000 | [diff] [blame] | 10 | } |
| 11 | |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 12 | float4 vertex_main_inner() { |
Ben Clayton | b07a7ce | 2021-06-03 11:26:17 +0000 | [diff] [blame] | 13 | sign_dd790e(); |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 14 | return float4(); |
| 15 | } |
| 16 | |
| 17 | vertex tint_symbol vertex_main() { |
| 18 | float4 const inner_result = vertex_main_inner(); |
| 19 | tint_symbol wrapper_result = {}; |
| 20 | wrapper_result.value = inner_result; |
| 21 | return wrapper_result; |
Ben Clayton | b07a7ce | 2021-06-03 11:26:17 +0000 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | fragment void fragment_main() { |
| 25 | sign_dd790e(); |
| 26 | return; |
| 27 | } |
| 28 | |
| 29 | kernel void compute_main() { |
| 30 | sign_dd790e(); |
| 31 | return; |
| 32 | } |
| 33 | |