Rebase against 2b76b9f234eb5d4753337d8b080f2c050daae3ff.

This commit is contained in:
Alistair Leslie-Hughes 2020-08-05 10:37:50 +10:00
parent e4a11b1663
commit eb32fd78ae
4 changed files with 18 additions and 65 deletions

View File

@ -1,18 +1,19 @@
From 2712050d88f9b75e0b10e845d1ad21809a9d6dae Mon Sep 17 00:00:00 2001
From 478753ef290789114c84c9c7a037206e4d5443f0 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 10 Apr 2015 07:51:16 +0200
Subject: msvcrt: Calculate sinh/cosh/exp/pow with higher precision. (v2)
Subject: [PATCH] msvcrt: Calculate sinh/cosh/exp/pow with higher precision.
(v2)
Based on a patch by Zheng Chen.
---
dlls/msvcrt/math.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 59 insertions(+), 4 deletions(-)
dlls/msvcrt/math.c | 61 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 58 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 60ce4e659f5..140bf08828b 100644
index 59b6a984878..11ba649a947 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -64,6 +64,61 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
@@ -69,6 +69,61 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
static BOOL sse2_supported;
static BOOL sse2_enabled;
@ -74,42 +75,33 @@ index 60ce4e659f5..140bf08828b 100644
void msvcrt_init_math(void)
{
sse2_supported = sse2_enabled = IsProcessorFeaturePresent( PF_XMMI64_INSTRUCTIONS_AVAILABLE );
@@ -478,7 +533,7 @@ double CDECL MSVCRT_cos( double x )
@@ -557,7 +612,7 @@ double CDECL MSVCRT_cos( double x )
*/
double CDECL MSVCRT_cosh( double x )
{
- double ret = cosh(x);
+ double ret = precise_cosh(x);
if (isnan(x)) math_error(_DOMAIN, "cosh", x, 0, ret);
if (isnan(x)) return math_error(_DOMAIN, "cosh", x, 0, ret);
return ret;
}
@@ -488,7 +543,7 @@ double CDECL MSVCRT_cosh( double x )
@@ -567,7 +622,7 @@ double CDECL MSVCRT_cosh( double x )
*/
double CDECL MSVCRT_exp( double x )
{
- double ret = exp(x);
+ double ret = precise_exp(x);
if (isnan(x)) math_error(_DOMAIN, "exp", x, 0, ret);
else if (isfinite(x) && !ret) math_error(_UNDERFLOW, "exp", x, 0, ret);
else if (isfinite(x) && !isfinite(ret)) math_error(_OVERFLOW, "exp", x, 0, ret);
@@ -532,7 +587,7 @@ double CDECL MSVCRT_log10( double x )
*/
double CDECL MSVCRT_pow( double x, double y )
{
- double z = pow(x,y);
+ double z = precise_pow(x,y);
if (x < 0 && y != floor(y)) math_error(_DOMAIN, "pow", x, y, z);
else if (!x && isfinite(y) && y < 0) math_error(_SING, "pow", x, y, z);
else if (isfinite(x) && isfinite(y) && !isfinite(z)) math_error(_OVERFLOW, "pow", x, y, z);
@@ -555,7 +610,7 @@ double CDECL MSVCRT_sin( double x )
if (isnan(x)) return math_error(_DOMAIN, "exp", x, 0, ret);
if (isfinite(x) && !ret) return math_error(_UNDERFLOW, "exp", x, 0, ret);
if (isfinite(x) && !isfinite(ret)) return math_error(_OVERFLOW, "exp", x, 0, ret);
@@ -638,7 +693,7 @@ double CDECL MSVCRT_sin( double x )
*/
double CDECL MSVCRT_sinh( double x )
{
- double ret = sinh(x);
+ double ret = precise_sinh(x);
if (isnan(x)) math_error(_DOMAIN, "sinh", x, 0, ret);
if (isnan(x)) return math_error(_DOMAIN, "sinh", x, 0, ret);
return ret;
}
--
2.14.1
2.27.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "18d7bc985990c1022a9f42d20cc819ba141af5cb"
echo "2b76b9f234eb5d4753337d8b080f2c050daae3ff"
}
# Show version information

View File

@ -1,39 +0,0 @@
From 3ad019171933268538e16f5ab14e0f7b5f4be5e2 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 8 Jan 2020 08:33:02 +1100
Subject: [PATCH] xaudio2_7: IXACT3Engine Initialize return valid error code
FACTAudioEngine_Initialize returns a uint32_t type, so we need to
convert to a valid HRESULT value.
---
dlls/xaudio2_7/xact_dll.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/xaudio2_7/xact_dll.c b/dlls/xaudio2_7/xact_dll.c
index 91e3ef0afd..1f580519d4 100644
--- a/dlls/xaudio2_7/xact_dll.c
+++ b/dlls/xaudio2_7/xact_dll.c
@@ -934,6 +934,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface,
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
FACTRuntimeParameters params;
+ UINT ret;
TRACE("(%p)->(%p)\n", This, pParams);
@@ -972,7 +973,11 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface,
params.fileIOCallbacks.readFileCallback = wrap_readfile;
params.fileIOCallbacks.getOverlappedResultCallback = wrap_getoverlappedresult;
- return FACTAudioEngine_Initialize(This->fact_engine, &params);
+ ret = FACTAudioEngine_Initialize(This->fact_engine, &params);
+ if (ret != 0)
+ FIXME("FACTAudioEngine_Initialize returned %d\n", ret);
+
+ return !ret ? S_OK : E_FAIL;
}
static HRESULT WINAPI IXACT3EngineImpl_ShutDown(IXACT3Engine *iface)
--
2.25.1

View File

@ -1 +1 @@
18d7bc985990c1022a9f42d20cc819ba141af5cb
2b76b9f234eb5d4753337d8b080f2c050daae3ff