mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +00:00
Polyfill them completely for HLSL. For the other backends, just add range checks for acosh and atanh. Fixed: tint:1465 Change-Id: I3abda99b474d9f5ba09abf400381467dc28ea0bd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94380 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
38 lines
619 B
Plaintext
38 lines
619 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
float tint_acosh(float x) {
|
|
return select(acosh(x), 0.0f, (x < 1.0f));
|
|
}
|
|
|
|
void acosh_ecf2d1() {
|
|
float res = tint_acosh(1.0f);
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
acosh_ecf2d1();
|
|
return float4(0.0f);
|
|
}
|
|
|
|
vertex tint_symbol vertex_main() {
|
|
float4 const inner_result = vertex_main_inner();
|
|
tint_symbol wrapper_result = {};
|
|
wrapper_result.value = inner_result;
|
|
return wrapper_result;
|
|
}
|
|
|
|
fragment void fragment_main() {
|
|
acosh_ecf2d1();
|
|
return;
|
|
}
|
|
|
|
kernel void compute_main() {
|
|
acosh_ecf2d1();
|
|
return;
|
|
}
|
|
|