mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 04:11:25 +00:00
CTS tests: https://github.com/gpuweb/cts/pull/1005 Bug: tint:1371 Change-Id: I228c7b2a27c6fbac0653c416fac603a6fb4bff85 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81640 Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
26 lines
475 B
Plaintext
26 lines
475 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
int tint_extract_bits(int v, uint offset, uint count) {
|
|
uint const s = min(offset, 32u);
|
|
uint const e = min(32u, (s + count));
|
|
return extract_bits(v, s, (e - s));
|
|
}
|
|
|
|
void f_1() {
|
|
int v = 0;
|
|
uint offset_1 = 0u;
|
|
uint count = 0u;
|
|
int const x_16 = v;
|
|
uint const x_17 = offset_1;
|
|
uint const x_18 = count;
|
|
int const x_14 = tint_extract_bits(x_16, x_17, x_18);
|
|
return;
|
|
}
|
|
|
|
kernel void f() {
|
|
f_1();
|
|
return;
|
|
}
|
|
|