mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-04 11:15:46 +00:00
Requires polyfilling for all but the MSL backend. CTS tests: https://github.com/gpuweb/cts/pull/1001 Bug: tint:1367 Change-Id: I75097de945909e3242ede9001124d8821bc832bc Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81380 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
34 lines
581 B
Plaintext
34 lines
581 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
void countLeadingZeros_858d40() {
|
|
int2 res = clz(int2());
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
countLeadingZeros_858d40();
|
|
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() {
|
|
countLeadingZeros_858d40();
|
|
return;
|
|
}
|
|
|
|
kernel void compute_main() {
|
|
countLeadingZeros_858d40();
|
|
return;
|
|
}
|
|
|