mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +00:00
Change-Id: I2da181af0694f73ec4be07ed40e4e70d49b53583 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97140 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
40 lines
771 B
Plaintext
40 lines
771 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
int2 tint_insert_bits(int2 v, int2 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 insertBits_fe6ba6() {
|
|
int2 res = tint_insert_bits(int2(1), int2(1), 1u, 1u);
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
insertBits_fe6ba6();
|
|
return float4(0.0f);
|
|
}
|
|
|
|
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() {
|
|
insertBits_fe6ba6();
|
|
return;
|
|
}
|
|
|
|
kernel void compute_main() {
|
|
insertBits_fe6ba6();
|
|
return;
|
|
}
|
|
|