dawn-cmake/test/tint/bug/chromium/1430309.wgsl.expected.glsl
Ben Clayton 47dd30117d tint/resolver: Resolve builtin structs
Allow the resolver to understand builtin structures, like
__frexp_result_f16. This allows backend transforms to declare the types,
even if they're "untypable" by the user.

Bug: chromium:1430309
Change-Id: I392709118182a058f737ccf1b7b46fc6b0b7264d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129482
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-04-26 18:27:53 +00:00

26 lines
426 B
GLSL

#version 310 es
precision highp float;
struct frexp_result_f32_1 {
float fract;
int exp;
};
layout(location = 0) out vec4 value;
struct frexp_result_f32 {
float f;
};
frexp_result_f32 a = frexp_result_f32(0.0f);
frexp_result_f32_1 b = frexp_result_f32_1(0.5f, 1);
vec4 tint_symbol() {
return vec4(a.f, b.fract, 0.0f, 0.0f);
}
void main() {
vec4 inner_result = tint_symbol();
value = inner_result;
return;
}