mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 12:15:43 +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>
31 lines
586 B
HLSL
31 lines
586 B
HLSL
float2 tint_unpack2x16snorm(uint param_0) {
|
|
int j = int(param_0);
|
|
int2 i = int2(j << 16, j) >> 16;
|
|
return clamp(float2(i) / 32767.0, -1.0, 1.0);
|
|
}
|
|
|
|
void unpack2x16snorm_b4aea6() {
|
|
float2 res = tint_unpack2x16snorm(1u);
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
tint_symbol vertex_main() {
|
|
unpack2x16snorm_b4aea6();
|
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
|
return tint_symbol_1;
|
|
}
|
|
|
|
void fragment_main() {
|
|
unpack2x16snorm_b4aea6();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
unpack2x16snorm_b4aea6();
|
|
return;
|
|
}
|