mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-14 00:56:05 +00:00
There's no good reason for this to be public. Move it into the writers, and expose a 'disable_robustness' option to turn it off. This can be expanded to hold more fine-grain control in the future. Change-Id: I6ea6e54a27b2ae0fbcba5fdf45539063045cc15a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122203 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
17 lines
296 B
Plaintext
17 lines
296 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
uint tint_mod(uint lhs, uint rhs) {
|
|
return (lhs % select(rhs, 1u, (rhs == 0u)));
|
|
}
|
|
|
|
void f_inner(uint3 v) {
|
|
uint const l = (v[0] << (tint_mod(v[1], 1u) & 31u));
|
|
}
|
|
|
|
kernel void f(uint3 v [[thread_position_in_grid]]) {
|
|
f_inner(v);
|
|
return;
|
|
}
|
|
|