dawn-cmake/test/tint/builtins/gen/countTrailingZeros/d2b4a0.wgsl.expected.msl
Ben Clayton f8672d8c35 builtins: Add countTrailingZeros
Requires polyfilling for all but the MSL backend.

CTS tests: https://github.com/gpuweb/cts/pull/1002

Bug: tint:1367
Change-Id: I0cf56b74c01f30436f9ad00595a554a4042587e4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81501
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
2022-02-22 23:16:39 +00:00

34 lines
587 B
Plaintext

#include <metal_stdlib>
using namespace metal;
void countTrailingZeros_d2b4a0() {
uint4 res = ctz(uint4());
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
countTrailingZeros_d2b4a0();
return float4();
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
countTrailingZeros_d2b4a0();
return;
}
kernel void compute_main() {
countTrailingZeros_d2b4a0();
return;
}