dawn-cmake/test/tint/builtins/repeated_use.wgsl.expected.glsl
Zhaoming Jiang 6fe1f515d4 tint: Add f16 support for parts of float built-in, part 1
This patch add f16 support for a major part of numeric built-in, and
implement corresponding unittests for resolver and backends. This patch
also enable f16 constant evaluation for unary minus operator, `atan2`
and `clamp`.

The following numeric built-ins are not supported yet:
* frexp
* modf

The end-to-end tests for f16 built-in are not added yet.

Bug: tint:1473, tint:1502
Change-Id: If807185617b21c510a1a9c371179a60800c4f875
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96722
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-07-29 11:41:51 +00:00

40 lines
850 B
GLSL

#version 310 es
vec4 tint_degrees(vec4 param_0) {
return param_0 * 57.295779513082322865f;
}
vec3 tint_degrees_1(vec3 param_0) {
return param_0 * 57.295779513082322865f;
}
vec2 tint_degrees_2(vec2 param_0) {
return param_0 * 57.295779513082322865f;
}
float tint_degrees_3(float param_0) {
return param_0 * 57.295779513082322865f;
}
void tint_symbol() {
tint_degrees(vec4(0.0f));
tint_degrees(vec4(1.0f));
tint_degrees(vec4(1.0f, 2.0f, 3.0f, 4.0f));
tint_degrees_1(vec3(0.0f));
tint_degrees_1(vec3(1.0f));
tint_degrees_1(vec3(1.0f, 2.0f, 3.0f));
tint_degrees_2(vec2(0.0f));
tint_degrees_2(vec2(1.0f));
tint_degrees_2(vec2(1.0f, 2.0f));
tint_degrees_3(1.0f);
tint_degrees_3(2.0f);
tint_degrees_3(3.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol();
return;
}