dawn-cmake/test/bug/tint/992.wgsl.expected.glsl
Stephen White 7368e287dc GLSL: fix single-valued vector init.
No need for the HLSL-style repeated swizzle; GLSL allows construction
of a vector from a scalar value of the component type.

Bug: tint:1317

Change-Id: Ia0afe3012cbb56716a2d1c5c3849dd662a5ff89c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70342
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-11-22 16:14:16 +00:00

28 lines
485 B
GLSL

#version 310 es
precision mediump float;
struct tint_symbol {
vec4 value;
};
vec4 frag_main_inner() {
float b = 0.0f;
vec3 v = vec3(b);
return vec4(v, 1.0f);
}
tint_symbol frag_main() {
vec4 inner_result = frag_main_inner();
tint_symbol wrapper_result = tint_symbol(vec4(0.0f, 0.0f, 0.0f, 0.0f));
wrapper_result.value = inner_result;
return wrapper_result;
}
out vec4 value;
void main() {
tint_symbol outputs;
outputs = frag_main();
value = outputs.value;
}