| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_private_vars_struct { |
| int global; |
| }; |
| |
| int tint_ftoi(float v) { |
| return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f)); |
| } |
| |
| void foo(float x) { |
| switch(tint_ftoi(x)) { |
| default: { |
| break; |
| } |
| } |
| } |
| |
| int baz(int x, thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).global = 42; |
| return x; |
| } |
| |
| void bar(float x, thread tint_private_vars_struct* const tint_private_vars) { |
| switch(baz(tint_ftoi(x), tint_private_vars)) { |
| default: { |
| break; |
| } |
| } |
| } |
| |
| void tint_symbol() { |
| } |
| |