mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-04 04:06:01 +00:00
Inline the `continuing` block in the places where `continue` is called. Simplifies the emission, and fixes emission of `let` statements in the loop. This fix matches the same approach in writer/hlsl. See: https://dawn-review.googlesource.com/c/tint/+/51784 Fixed: tint:833 Fixed: tint:914 Change-Id: If4d8cde62dfaf8efa24272854ca7ff5edc0a8234 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55341 Commit-Queue: Ben Clayton <bclayton@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
34 lines
809 B
Plaintext
34 lines
809 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_symbol_2 {
|
|
/* 0x0000 */ uint buffer_size[2];
|
|
};
|
|
struct SB_RO {
|
|
/* 0x0000 */ uint arg_0[1];
|
|
};
|
|
struct tint_symbol {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
void arrayLength_cfca0a(constant tint_symbol_2& tint_symbol_3) {
|
|
uint res = ((tint_symbol_3.buffer_size[1u] - 0u) / 4u);
|
|
}
|
|
|
|
vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
|
|
arrayLength_cfca0a(tint_symbol_3);
|
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
|
return tint_symbol_1;
|
|
}
|
|
|
|
fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
|
|
arrayLength_cfca0a(tint_symbol_3);
|
|
return;
|
|
}
|
|
|
|
kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
|
|
arrayLength_cfca0a(tint_symbol_3);
|
|
return;
|
|
}
|
|
|