mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 20:31:20 +00:00
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>
25 lines
347 B
GLSL
25 lines
347 B
GLSL
#version 310 es
|
|
|
|
float tint_radians(float param_0) {
|
|
return param_0 * 0.017453292519943295474f;
|
|
}
|
|
|
|
|
|
void main_1() {
|
|
float a = 0.0f;
|
|
float b = 0.0f;
|
|
a = 42.0f;
|
|
b = tint_radians(a);
|
|
return;
|
|
}
|
|
|
|
void tint_symbol() {
|
|
main_1();
|
|
}
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void main() {
|
|
tint_symbol();
|
|
return;
|
|
}
|