mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 04:11:25 +00:00
This is required to handle materialized values, and for constant expressions. Bug: tint:1504 Change-Id: Ic3ac62317241fa6f7009360128f222aeb56f62e4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92083 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
28 lines
555 B
Plaintext
28 lines
555 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) {
|
|
uint const s = min(offset, 32u);
|
|
uint const e = min(32u, (s + count));
|
|
return insert_bits(v, n, s, (e - s));
|
|
}
|
|
|
|
void f_1() {
|
|
uint3 v = uint3(0u);
|
|
uint3 n = uint3(0u);
|
|
uint offset_1 = 0u;
|
|
uint count = 0u;
|
|
uint3 const x_17 = v;
|
|
uint3 const x_18 = n;
|
|
uint const x_19 = offset_1;
|
|
uint const x_20 = count;
|
|
uint3 const x_15 = tint_insert_bits(x_17, x_18, x_19, x_20);
|
|
return;
|
|
}
|
|
|
|
kernel void f() {
|
|
f_1();
|
|
return;
|
|
}
|
|
|