mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 19:55:37 +00:00
And call these helpers instead of inlining complex statements. Cleans up output, and helps prevent for-loops decaying to while loops. Change-Id: I6ac31b18ce6c5fac0e54e982f7db3bb298f7edb2 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58060 Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org> Reviewed-by: David Neto <dneto@google.com>
30 lines
546 B
HLSL
30 lines
546 B
HLSL
float2 tint_unpack2x16float(uint param_0) {
|
|
uint i = param_0;
|
|
return f16tof32(uint2(i & 0xffff, i >> 16));
|
|
}
|
|
|
|
void unpack2x16float_32a5cf() {
|
|
float2 res = tint_unpack2x16float(1u);
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
tint_symbol vertex_main() {
|
|
unpack2x16float_32a5cf();
|
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
|
return tint_symbol_1;
|
|
}
|
|
|
|
void fragment_main() {
|
|
unpack2x16float_32a5cf();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
unpack2x16float_32a5cf();
|
|
return;
|
|
}
|