Commit 4d838a8c by Chris Forbes

Replace sinh,cosh with implementations in terms of Exp()

Vulkan CTS 1.1.5 is stricter about edge cases here, and sinhf/coshf aren't cutting it. Test: dEQP-VK.*cosh* Test: dEQP-VK.*sinh* Bug: b/140501860 Change-Id: I21895cbff9f54bccb7d40fb75e09eebe7db18fa1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35988Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent cf0e2fe1
......@@ -3814,12 +3814,12 @@ namespace rr
RValue<Float4> Sinh(RValue<Float4> v)
{
return TransformFloat4PerElement(v, "sinhf");
return Float4(0.5f) * (Exp(v) - Exp(-v));
}
RValue<Float4> Cosh(RValue<Float4> v)
{
return TransformFloat4PerElement(v, "coshf");
return Float4(0.5f) * (Exp(v) + Exp(-v));
}
RValue<Float4> Tanh(RValue<Float4> v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment