dawn-cmake/test/tint/statements/compound_assign/function.wgsl.expected.msl

17 lines
381 B
Plaintext
Raw Normal View History

#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() {
int a = 0;
float4 b = 0.0f;
float2x2 c = float2x2(0.0f);
a = tint_div(a, 2);
b = (b * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
c = (c * 2.0f);
}