dawn-cmake/test/expressions/literals/inf.spvasm.expected.glsl
Stephen White 1704fe53f5 GLSL: implement inf, nan.
Use uintBitsToFloat.

Bug: tint:1306
Change-Id: Ie9a5e14c13c0d63b57c126f16c4e2a5c7a77e3f7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69740
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-11-18 13:11:43 +00:00

38 lines
913 B
GLSL

#version 310 es
precision mediump float;
vec4 out_var_SV_TARGET = vec4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
out_var_SV_TARGET = vec4(uintBitsToFloat(0x7f800000u), uintBitsToFloat(0x7f800000u), uintBitsToFloat(0x7f800000u), uintBitsToFloat(0x7f800000u));
return;
}
struct main_out {
vec4 out_var_SV_TARGET_1;
};
struct tint_symbol_1 {
vec4 out_var_SV_TARGET_1;
};
main_out tint_symbol_inner() {
main_1();
main_out tint_symbol_2 = main_out(out_var_SV_TARGET);
return tint_symbol_2;
}
tint_symbol_1 tint_symbol() {
main_out inner_result = tint_symbol_inner();
tint_symbol_1 wrapper_result = tint_symbol_1(vec4(0.0f, 0.0f, 0.0f, 0.0f));
wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
return wrapper_result;
}
out vec4 out_var_SV_TARGET_1;
void main() {
tint_symbol_1 outputs;
outputs = tint_symbol();
out_var_SV_TARGET_1 = outputs.out_var_SV_TARGET_1;
}