[PATCH 1/3] ddraw/tests: Reduce precision in test_filling_convention.

Stefan Dösinger stefan at codeweavers.com
Mon Jan 10 02:00:46 CST 2022


Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>

---

d3d9 and earlier cards fail this test (tested on r500 and by Matteo on a
gf4go, aka gf2). Since applications using ddraw.dll are unlikely to
depend on the higher precision of d3d10+ cards, unconditionally increase
the added offsets in the test.

As far as my hardware is concerned we can now remove the todo_wine in
this test because the offset we add for the "nudge" primitives is larger
than the offset wined3d adds for correcting the filling convention. I'll
wait for Matteo's word on the geforce 4 though.
---
 dlls/ddraw/tests/ddraw1.c | 6 ++++--
 dlls/ddraw/tests/ddraw2.c | 6 ++++--
 dlls/ddraw/tests/ddraw4.c | 6 ++++--
 dlls/ddraw/tests/ddraw7.c | 6 ++++--
 4 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 11c14777122..efbecf04c2d 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -14513,8 +14513,10 @@ static void test_filling_convention(void)
     D3DRECT clear_rect = {{0}, {0}, {vp_size}, {vp_size}};
 
     /* This test data follows the examples in MSDN's
-     * "Rasterization Rules (Direct3D 9)" article. */
-    static const float eps = 1.0f / 512.0f;
+     * "Rasterization Rules (Direct3D 9)" article.
+     *
+     * See the d3d9 test for a comment about the eps value. */
+    static const float eps = 1.0f / 64.0f;
     D3DLVERTEX center_tris[] =
     {
         /* left */
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 33ad957b644..65ac21d73ad 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -15443,8 +15443,10 @@ static void test_filling_convention(void)
     D3DRECT clear_rect = {{0}, {0}, {vp_size}, {vp_size}};
 
     /* This test data follows the examples in MSDN's
-     * "Rasterization Rules (Direct3D 9)" article. */
-    static const float eps = 1.0f / 512.0f;
+     * "Rasterization Rules (Direct3D 9)" article.
+     *
+     * See the d3d9 test for a comment about the eps value. */
+    static const float eps = 1.0f / 64.0f;
     D3DLVERTEX center_tris[] =
     {
         /* left */
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 61828430331..ce2333d93f0 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -18493,8 +18493,10 @@ static void test_filling_convention(void)
     D3DRECT clear_rect = {{0}, {0}, {vp_size}, {vp_size}};
 
     /* This test data follows the examples in MSDN's
-     * "Rasterization Rules (Direct3D 9)" article. */
-    static const float eps = 1.0f / 512.0f;
+     * "Rasterization Rules (Direct3D 9)" article.
+     *
+     * See the d3d9 test for a comment about the eps value. */
+    static const float eps = 1.0f / 64.0f;
     struct
     {
         struct vec3 position;
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index fc0f854e125..4cf57bfcfd3 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -18745,8 +18745,10 @@ static void test_filling_convention(void)
     D3DVIEWPORT7 vp = { 0, 0, vp_size, vp_size, 0.0, 1.0 };
 
     /* This test data follows the examples in MSDN's
-     * "Rasterization Rules (Direct3D 9)" article. */
-    static const float eps = 1.0f / 512.0f;
+     * "Rasterization Rules (Direct3D 9)" article.
+     *
+     * See the d3d9 test for a comment about the eps value. */
+    static const float eps = 1.0f / 64.0f;
     struct
     {
         struct vec3 position;
-- 
2.34.1




More information about the wine-devel mailing list