mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 699eb8cdba8fe236f038550e2bd68a4cd2cab055.
This commit is contained in:
parent
ceb31ed876
commit
60f0f50382
@ -1,803 +0,0 @@
|
||||
From ad8b97f0e3819c17b50fc97739eebfffd0ad9875 Mon Sep 17 00:00:00 2001
|
||||
From: David Adam <david.adam.cnrs@gmail.com>
|
||||
Date: Wed, 31 Oct 2018 21:06:49 -1000
|
||||
Subject: [PATCH] d3dx9_36/tests: Fix D3DXMatrixTransformation when the scaling
|
||||
matrix is NULL
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33456
|
||||
Signed-off-by: David Adam <david.adam.cnrs@gmail.com>
|
||||
---
|
||||
dlls/d3dx9_36/math.c | 24 +-
|
||||
dlls/d3dx9_36/tests/math.c | 710 ++++++++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 725 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
|
||||
index 8909c3c..03ccbd0 100644
|
||||
--- a/dlls/d3dx9_36/math.c
|
||||
+++ b/dlls/d3dx9_36/math.c
|
||||
@@ -794,24 +794,34 @@ D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, const D3DXVECTOR3
|
||||
|
||||
D3DXMatrixTranslation(&m1, -psc.x, -psc.y, -psc.z);
|
||||
|
||||
- if ( !pscalingrotation )
|
||||
+ if ( !pscalingrotation || !pscaling )
|
||||
{
|
||||
D3DXMatrixIdentity(&m2);
|
||||
D3DXMatrixIdentity(&m4);
|
||||
}
|
||||
else
|
||||
{
|
||||
+ D3DXQUATERNION temp;
|
||||
+
|
||||
D3DXMatrixRotationQuaternion(&m4, pscalingrotation);
|
||||
- D3DXMatrixInverse(&m2, NULL, &m4);
|
||||
+ temp.w = pscalingrotation->w;
|
||||
+ temp.x = -pscalingrotation->x;
|
||||
+ temp.y = -pscalingrotation->y;
|
||||
+ temp.z = -pscalingrotation->z;
|
||||
+ D3DXMatrixRotationQuaternion(&m2, &temp);
|
||||
}
|
||||
|
||||
- if ( !pscaling ) D3DXMatrixIdentity(&m3);
|
||||
- else D3DXMatrixScaling(&m3, pscaling->x, pscaling->y, pscaling->z);
|
||||
+ if ( !pscaling )
|
||||
+ D3DXMatrixIdentity(&m3);
|
||||
+ else
|
||||
+ D3DXMatrixScaling(&m3, pscaling->x, pscaling->y, pscaling->z);
|
||||
|
||||
- if ( !protation ) D3DXMatrixIdentity(&m6);
|
||||
- else D3DXMatrixRotationQuaternion(&m6, protation);
|
||||
+ if ( !protation )
|
||||
+ D3DXMatrixIdentity(&m6);
|
||||
+ else
|
||||
+ D3DXMatrixRotationQuaternion(&m6, protation);
|
||||
|
||||
- D3DXMatrixTranslation(&m5, psc.x - prc.x, psc.y - prc.y, psc.z - prc.z);
|
||||
+ D3DXMatrixTranslation(&m5, psc.x - prc.x, psc.y - prc.y, psc.z - prc.z);
|
||||
D3DXMatrixTranslation(&m7, prc.x + pt.x, prc.y + pt.y, prc.z + pt.z);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m2);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m3);
|
||||
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
|
||||
index e433b1f..de86655 100644
|
||||
--- a/dlls/d3dx9_36/tests/math.c
|
||||
+++ b/dlls/d3dx9_36/tests/math.c
|
||||
@@ -640,12 +640,718 @@ static void D3DXMatrixTest(void)
|
||||
|
||||
/*____________D3DXMatrixTransformation______________*/
|
||||
set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 8.5985f, -21.024f, 14.383499, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 48);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 0.0f, 52.0f, 54.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 18.2985f, -29.624001f, 15.683499f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 9.7f, 43.400002f, 55.299999f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 8.5985f, -21.024f, 14.383499, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 8.5985f, -21.024f, 14.383499, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 8.5985f, -21.024f, 14.383499, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 104.565598f, -35.492798f, -25.306400f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 0.0f, 52.0f, 54.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ -287420.0f, -14064.0f, 37122.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 18.2985f, -29.624001f, 15.683499f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 18.2985f, -29.624001f, 15.683499f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 18.2985f, -29.624001f, 15.683499f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 114.265594f, -44.092796f, -24.006401f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, -3.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 7.0f, 0.0f,
|
||||
+ 9.7f, 43.400002f, 55.299999f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 9.7f, -8.6f, 1.3f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ -287410.3125f, -14072.599609f, 37123.300781f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 8.598499f, -21.024f, 14.383499f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 113.164093f, -56.5168f, -10.922897f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ 0.9504f, -0.8836f, 0.9244f, 0.0f,
|
||||
+ 1.0212f, 0.1936f, -1.3588f, 0.0f,
|
||||
+ 8.5985f, -21.024f, 14.383499, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 86280.34375f, -357366.3125f, -200024.125f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ -287410.3125f, -14064.0f, 37122.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, &eye, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 512);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 86280.34375f, -357366.3125f, -200009.75f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, &eye, &r, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 4096);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25521.0f, 39984.0f, 20148.0f, 0.0f,
|
||||
+ 39984.0f, 4933.0f, -3324.0f, 0.0f,
|
||||
+ 20148.0f, -3324.0f, -5153.0f, 0.0f,
|
||||
+ -287410.3125f, -14072.599609f, 37123.300781f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, &eye, NULL, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 86290.046875f, -357374.90625f, -200022.828125f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
-0.21480007f, 1.3116000f, 0.47520003f, 0.0f,
|
||||
0.95040143f, -0.88360137f, 0.92439979f, 0.0f,
|
||||
1.0212044f, 0.19359307f, -1.3588026f, 0.0f,
|
||||
18.298532f, -29.624001f, 15.683499f, 1.0f);
|
||||
D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, &r, &last);
|
||||
expect_matrix(&expectedmat, &gotmat, 512);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 1024);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ -0.2148f, 1.3116f, 0.4752f, 0.0f,
|
||||
+ -2.8512f, 2.6508f, -2.7732f, 0.0f,
|
||||
+ 7.148399f, 1.3552f, -9.5116f, 0.0f,
|
||||
+ 122.86409f, -65.116798f, -9.622897f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 8);
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 53094.015625f, 2044.133789f, 21711.687500f, 0.0f,
|
||||
+ -7294.705078f, 47440.683594f, 28077.113281, 0.0f,
|
||||
+ -12749.161133f, 28365.580078f, 13503.520508f, 0.0f,
|
||||
+ 18.2985f, -29.624001f, 15.683499f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, &r, &last);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 2);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 1.0f, q.z = 1.0f, q.w = 1.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 2.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 41.0f, -12.0f, -24.0f, 0.0f,
|
||||
+ -12.0f, 25.0f, -12.0f, 0.0f,
|
||||
+ -24.0f, -12.0f, 34.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 1.0f, q.z = 1.0f, q.w = 1.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 57.0f, -12.0f, -36.0f, 0.0f,
|
||||
+ -12.0f, 25.0f, -12.0f, 0.0f,
|
||||
+ -36.0f, -12.0f, 43.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 1.0f, q.z = 1.0f, q.w = 0.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 25.0f, 0.0f, -20.0f, 0.0f,
|
||||
+ 0.0f, 25.0f, -20.0f, 0.0f,
|
||||
+ -20.0f, -20.0f, 35.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 1.0f, q.z = 0.0f, q.w = 0.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 5.0f, -4.0f, 0.0f, 0.0f,
|
||||
+ -4.0f, 5.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 27.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 0.0f,
|
||||
+ axis.x = 5.0f, axis.y = 2.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 5.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 2.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 0.0f,
|
||||
+ axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 4.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 0.0f, q.y = 1.0f, q.z = 0.0f, q.w = 0.0f,
|
||||
+ axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 4.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 1.0f,
|
||||
+ axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 8.0f, -6.0f, 0.0f,
|
||||
+ 0.0f, -6.0f, 17.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 1.0f,
|
||||
+ axis.x = 0.0f, axis.y = 4.0f, axis.z = 0.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 4.0f, -8.0f, 0.0f,
|
||||
+ 0.0f, -8.0f, 16.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 0.0f, q.y = 1.0f, q.z = 0.0f, q.w = 1.0f,
|
||||
+ axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 5.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 4.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 5.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 0.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 3.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 3.0f, axis.y = 3.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 3796587.0f, -1377948.0f, -1589940.0f, 0.0f,
|
||||
+ -1377948.0f, 3334059.0f, -1879020.0f, 0.0f,
|
||||
+ -1589940.0f, -1879020.0f, 2794443.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1265529.0f, -459316.0f, -529980.0f, 0.0f,
|
||||
+ -459316.0f, 1111353.0f, -626340.0f, 0.0f,
|
||||
+ -529980.0f, -626340.0f, 931481.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 2457497.0f, -434612.0f, -1423956.0f, 0.0f,
|
||||
+ -434612.0f, 1111865.0f, -644868.0f, 0.0f,
|
||||
+ -1423956.0f, -644868.0f, 1601963.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 0.0f, axis.y = 0.0f, axis.z = 3.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 1787952.0f, 37056.0f, -1340964.0f, 0.0f,
|
||||
+ 37056.0f, 768.0f, -27792.0f, 0.0f,
|
||||
+ -1340964.0f, -27792.0f, 1005723.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 0.0f, axis.y = 0.0f, axis.z = 1.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 595984.0f, 12352.0f, -446988.0f, 0.0f,
|
||||
+ 12352.0f, 256.0f, -9264.0f, 0.0f,
|
||||
+ -446988.0f, -9264.0f, 335241.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 0.0f, axis.y = 3.0f, axis.z = 0.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 150528.0f, 464352.0f, -513408.0f, 0.0f,
|
||||
+ 464352.0f, 1432443.0f, -1583772.0f, 0.0f,
|
||||
+ -513408.0f, -1583772.0f, 1751088.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 0.0f, axis.y = 1.0f, axis.z = 0.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 50176.0f, 154784.0f, -171136.0f, 0.0f,
|
||||
+ 154784.0f, 477481.0f, -527924.0f, 0.0f,
|
||||
+ -171136.0f, -527924.0f, 583696.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
+
|
||||
+ q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f,
|
||||
+ axis.x = 1.0f, axis.y = 0.0f, axis.z = 0.0f,
|
||||
+
|
||||
+ set_matrix(&expectedmat,
|
||||
+ 619369.0f, -626452.0f, 88144.0f, 0.0f,
|
||||
+ -626452.0f, 633616.0f, -89152.0f, 0.0f,
|
||||
+ 88144.0f, -89152, 12544.0f, 0.0f,
|
||||
+ 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL);
|
||||
+ expect_matrix(&expectedmat, &gotmat, 0);
|
||||
|
||||
/*____________D3DXMatrixTranslation______________*/
|
||||
set_matrix(&expectedmat,
|
||||
@@ -2315,7 +3021,7 @@ static void test_Matrix_Transformation2D(void)
|
||||
U(exp_mat).m[3][3] = 1.0f;
|
||||
|
||||
D3DXMatrixTransformation2D(&got_mat, &sca_center, sca_rot, NULL, NULL, rot, &trans);
|
||||
- expect_matrix(&exp_mat, &got_mat, 8);
|
||||
+ expect_matrix(&exp_mat, &got_mat, 10);
|
||||
|
||||
/*_________*/
|
||||
|
||||
@@ -2337,7 +3043,7 @@ static void test_Matrix_Transformation2D(void)
|
||||
U(exp_mat).m[3][3] = 1.0f;
|
||||
|
||||
D3DXMatrixTransformation2D(&got_mat, NULL, sca_rot, NULL, NULL, rot, NULL);
|
||||
- expect_matrix(&exp_mat, &got_mat, 8);
|
||||
+ expect_matrix(&exp_mat, &got_mat, 10);
|
||||
}
|
||||
|
||||
static void test_D3DXVec_Array(void)
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [33456] d3dx9_36: D3DXMatrixTransformation support NULL scaling matrix
|
@ -1,20 +1,20 @@
|
||||
From 7b85e96f6dbced2fa2bb4c8f73b26abfd442dfef Mon Sep 17 00:00:00 2001
|
||||
From fe51309d6a518b11b1d9db5e42abfb6d31cae9eb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 6 Jun 2017 23:42:56 +0200
|
||||
Subject: [PATCH] ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.
|
||||
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 19 +++++++++-
|
||||
dlls/ntoskrnl.exe/tests/driver.c | 37 +++++++++++++++++--
|
||||
include/ddk/wdm.h | 76 ++++++++++++++++++++++++++++++++++++++--
|
||||
include/winnt.h | 2 ++
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 19 +++++++-
|
||||
dlls/ntoskrnl.exe/tests/driver.c | 37 ++++++++++++++--
|
||||
include/ddk/wdm.h | 76 ++++++++++++++++++++++++++++++--
|
||||
include/winnt.h | 2 +
|
||||
4 files changed, 127 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 14a6e82..6123a45 100644
|
||||
index 952fa5ec..2e08a50e 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -2029,7 +2029,24 @@ void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside,
|
||||
@@ -2181,7 +2181,24 @@ void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside,
|
||||
ULONG Tag,
|
||||
USHORT Depth)
|
||||
{
|
||||
@ -41,7 +41,7 @@ index 14a6e82..6123a45 100644
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
index 2e1107b..4f32c30 100644
|
||||
index e361d345..2260816c 100644
|
||||
--- a/dlls/ntoskrnl.exe/tests/driver.c
|
||||
+++ b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
@@ -22,6 +22,9 @@
|
||||
@ -54,7 +54,7 @@ index 2e1107b..4f32c30 100644
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
@@ -525,6 +528,33 @@ static void test_version(void)
|
||||
@@ -528,6 +531,33 @@ static void test_version(void)
|
||||
ok(*pNtBuildNumber == build, "Expected build number %u, got %u\n", build, *pNtBuildNumber);
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ index 2e1107b..4f32c30 100644
|
||||
static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
|
||||
{
|
||||
ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength;
|
||||
@@ -555,6 +585,7 @@ static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
|
||||
@@ -558,6 +588,7 @@ static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
|
||||
test_load_driver();
|
||||
test_sync();
|
||||
test_version();
|
||||
@ -96,7 +96,7 @@ index 2e1107b..4f32c30 100644
|
||||
|
||||
/* print process report */
|
||||
if (test_input->winetest_debug)
|
||||
@@ -606,7 +637,7 @@ static NTSTATUS test_load_driver_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG
|
||||
@@ -609,7 +640,7 @@ static NTSTATUS test_load_driver_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG
|
||||
|
||||
static NTSTATUS WINAPI driver_Create(DEVICE_OBJECT *device, IRP *irp)
|
||||
{
|
||||
@ -105,7 +105,7 @@ index 2e1107b..4f32c30 100644
|
||||
IoCompleteRequest(irp, IO_NO_INCREMENT);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -631,14 +662,14 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp)
|
||||
@@ -634,14 +665,14 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ index 2e1107b..4f32c30 100644
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
|
||||
index b5e4424..9ff245e 100644
|
||||
index a53c7a26..ca83129f 100644
|
||||
--- a/include/ddk/wdm.h
|
||||
+++ b/include/ddk/wdm.h
|
||||
@@ -153,20 +153,18 @@ typedef struct _KWAIT_BLOCK {
|
||||
@ -242,12 +242,12 @@ index b5e4424..9ff245e 100644
|
||||
+void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST,PALLOCATE_FUNCTION,PFREE_FUNCTION,ULONG,SIZE_T,ULONG,USHORT);
|
||||
PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
|
||||
PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK);
|
||||
void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX);
|
||||
LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*);
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 66720a2..2b15c8c 100644
|
||||
index c08ee9a4..a156efc4 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -755,6 +755,8 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
@@ -757,6 +757,8 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
#define UNICODE_STRING_MAX_CHARS 32767
|
||||
|
||||
#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
|
||||
@ -257,5 +257,5 @@ index 66720a2..2b15c8c 100644
|
||||
#ifdef __GNUC__
|
||||
# define CONTAINING_RECORD(address, type, field) ({ \
|
||||
--
|
||||
2.7.4
|
||||
2.20.1
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 83e27676c959aa8968d4db9c5ce898b4fe91b8f3 Mon Sep 17 00:00:00 2001
|
||||
From 5dd48cb814d0b69b43c5a57022d3beef8c2418a0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 27 Jun 2017 00:28:03 +0200
|
||||
Subject: nvapi: Implement NvAPI_GPU_Get{Physical,Virtual}FrameBufferSize.
|
||||
|
||||
---
|
||||
dlls/nvapi/Makefile.in | 1 +
|
||||
dlls/nvapi/nvapi.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/nvapi/nvapi.c | 75 ++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/nvapi64/Makefile.in | 1 +
|
||||
3 files changed, 76 insertions(+)
|
||||
3 files changed, 77 insertions(+)
|
||||
|
||||
diff --git a/dlls/nvapi/Makefile.in b/dlls/nvapi/Makefile.in
|
||||
index 606177f1f8b..6341254d9f6 100644
|
||||
index 606177f1..6341254d 100644
|
||||
--- a/dlls/nvapi/Makefile.in
|
||||
+++ b/dlls/nvapi/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
@ -20,10 +20,14 @@ index 606177f1f8b..6341254d9f6 100644
|
||||
C_SRCS = \
|
||||
nvapi.c
|
||||
diff --git a/dlls/nvapi/nvapi.c b/dlls/nvapi/nvapi.c
|
||||
index 598267d6c86..372ae359ded 100644
|
||||
index 598267d6..d2c88655 100644
|
||||
--- a/dlls/nvapi/nvapi.c
|
||||
+++ b/dlls/nvapi/nvapi.c
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -18,9 +18,11 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
@ -31,7 +35,7 @@ index 598267d6c86..372ae359ded 100644
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winternl.h"
|
||||
@@ -29,6 +30,8 @@
|
||||
@@ -29,6 +31,8 @@
|
||||
#include "nvapi.h"
|
||||
#include "d3d9.h"
|
||||
|
||||
@ -40,7 +44,7 @@ index 598267d6c86..372ae359ded 100644
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(nvapi);
|
||||
|
||||
#define FAKE_PHYSICAL_GPU ((NvPhysicalGpuHandle)0xdead0001)
|
||||
@@ -589,6 +592,75 @@ static NvAPI_Status CDECL NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResou
|
||||
@@ -589,6 +593,75 @@ static NvAPI_Status CDECL NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResou
|
||||
return NVAPI_ERROR;
|
||||
}
|
||||
|
||||
@ -116,7 +120,7 @@ index 598267d6c86..372ae359ded 100644
|
||||
void* CDECL nvapi_QueryInterface(unsigned int offset)
|
||||
{
|
||||
static const struct
|
||||
@@ -631,6 +703,8 @@ void* CDECL nvapi_QueryInterface(unsigned int offset)
|
||||
@@ -631,6 +704,8 @@ void* CDECL nvapi_QueryInterface(unsigned int offset)
|
||||
{0xee1370cf, NvAPI_GetLogicalGPUFromDisplay},
|
||||
{0xfceac864, NvAPI_D3D_GetObjectHandleForResource},
|
||||
{0xa064bdfc, NvAPI_D3D9_RegisterResource},
|
||||
@ -126,7 +130,7 @@ index 598267d6c86..372ae359ded 100644
|
||||
unsigned int i;
|
||||
TRACE("(%x)\n", offset);
|
||||
diff --git a/dlls/nvapi64/Makefile.in b/dlls/nvapi64/Makefile.in
|
||||
index 80e2d6bfb20..04bd0cf1c46 100644
|
||||
index 80e2d6bf..04bd0cf1 100644
|
||||
--- a/dlls/nvapi64/Makefile.in
|
||||
+++ b/dlls/nvapi64/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -137,5 +141,5 @@ index 80e2d6bfb20..04bd0cf1c46 100644
|
||||
C_SRCS = \
|
||||
nvapi.c
|
||||
--
|
||||
2.13.1
|
||||
2.20.1
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "fee112f90accd80805e9b499b9f8917661f76cba"
|
||||
echo "699eb8cdba8fe236f038550e2bd68a4cd2cab055"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -112,7 +112,6 @@ patch_enable_all ()
|
||||
enable_d3dx9_36_BumpLuminance="$1"
|
||||
enable_d3dx9_36_CloneEffect="$1"
|
||||
enable_d3dx9_36_D3DXDisassembleShader="$1"
|
||||
enable_d3dx9_36_D3DXMatrixTransformation="$1"
|
||||
enable_d3dx9_36_D3DXOptimizeVertices="$1"
|
||||
enable_d3dx9_36_D3DXSHProjectCubeMap="$1"
|
||||
enable_d3dx9_36_D3DXStubs="$1"
|
||||
@ -501,9 +500,6 @@ patch_enable ()
|
||||
d3dx9_36-D3DXDisassembleShader)
|
||||
enable_d3dx9_36_D3DXDisassembleShader="$2"
|
||||
;;
|
||||
d3dx9_36-D3DXMatrixTransformation)
|
||||
enable_d3dx9_36_D3DXMatrixTransformation="$2"
|
||||
;;
|
||||
d3dx9_36-D3DXOptimizeVertices)
|
||||
enable_d3dx9_36_D3DXOptimizeVertices="$2"
|
||||
;;
|
||||
@ -2964,21 +2960,6 @@ if test "$enable_d3dx9_36_D3DXDisassembleShader" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3dx9_36-D3DXMatrixTransformation
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#33456] d3dx9_36: D3DXMatrixTransformation support NULL scaling matrix
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx9_36/math.c, dlls/d3dx9_36/tests/math.c
|
||||
# |
|
||||
if test "$enable_d3dx9_36_D3DXMatrixTransformation" -eq 1; then
|
||||
patch_apply d3dx9_36-D3DXMatrixTransformation/0001-d3dx9_36-tests-Fix-D3DXMatrixTransformation-when-the.patch
|
||||
(
|
||||
printf '%s\n' '+ { "David Adam", "d3dx9_36/tests: Fix D3DXMatrixTransformation when the scaling matrix is NULL.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3dx9_36-D3DXOptimizeVertices
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
x
Reference in New Issue
Block a user