17 lines
504 B
Plaintext
17 lines
504 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
int tint_div(int lhs, int rhs) {
|
|
return (lhs / select(rhs, 1, bool((rhs == 0) | bool((lhs == (-2147483647 - 1)) & (rhs == -1)))));
|
|
}
|
|
|
|
void foo() {
|
|
thread int tint_symbol = 0;
|
|
thread float4 tint_symbol_1 = 0.0f;
|
|
thread float2x2 tint_symbol_2 = float2x2(0.0f);
|
|
tint_symbol = tint_div(tint_symbol, 2);
|
|
tint_symbol_1 = (tint_symbol_1 * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
|
|
tint_symbol_2 = (tint_symbol_2 * 2.0f);
|
|
}
|
|
|