mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-13 16:45:56 +00:00
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>
26 lines
426 B
GLSL
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;
|
|
}
|