=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3d/tests: Show that the vfog abs is not a property of D3DFOG_LINEAR.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 27 16:07:42 CST 2014


Module: wine
Branch: master
Commit: cfd741c6b60881f767c71f2b9a1f02252d7b4d95
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cfd741c6b60881f767c71f2b9a1f02252d7b4d95

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Thu Nov 27 12:12:34 2014 +0100

d3d/tests: Show that the vfog abs is not a property of D3DFOG_LINEAR.

---

 dlls/d3d8/tests/visual.c  | 10 ++++++----
 dlls/d3d9/tests/visual.c  | 10 ++++++----
 dlls/ddraw/tests/ddraw7.c | 10 ++++++----
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index 317df5a..1cd066c 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -5389,6 +5389,7 @@ static void test_negative_fixedfunction_fog(void)
             float f;
             DWORD d;
         } start, end;
+        D3DFOGMODE vfog;
         DWORD color;
     }
     tests[] =
@@ -5396,8 +5397,9 @@ static void test_negative_fixedfunction_fog(void)
         /* fog_interpolation_test shows that vertex fog evaluates the fog
          * equation in the vertex pipeline. Start = -1.0 && end = 0.0 shows
          * that the abs happens before the fog equation is evaluated. */
-        {{ 0.0f}, {1.0f}, 0x00808000},
-        {{-1.0f}, {0.0f}, 0x0000ff00},
+        {{ 0.0f}, {1.0f}, D3DFOG_LINEAR,    0x00808000},
+        {{-1.0f}, {0.0f}, D3DFOG_LINEAR,    0x0000ff00},
+        {{ 0.0f}, {1.0f}, D3DFOG_EXP,       0x009b6400},
     };
     static const D3DMATRIX proj_mat =
     {{{
@@ -5430,8 +5432,6 @@ static void test_negative_fixedfunction_fog(void)
     ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
     hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGCOLOR, 0x0000ff00);
     ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
-    hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);
-    ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
     hr = IDirect3DDevice8_SetTransform(device, D3DTS_PROJECTION, &proj_mat);
     ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr);
 
@@ -5444,6 +5444,8 @@ static void test_negative_fixedfunction_fog(void)
         ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
         hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGEND, tests[i].end.d);
         ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+        hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGVERTEXMODE, tests[i].vfog);
+        ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
         hr = IDirect3DDevice8_BeginScene(device);
         ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
         hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 6ee19b0..6bf9adc 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -16992,6 +16992,7 @@ static void test_negative_fixedfunction_fog(void)
             float f;
             DWORD d;
         } start, end;
+        D3DFOGMODE vfog;
         DWORD color;
     }
     tests[] =
@@ -16999,8 +17000,9 @@ static void test_negative_fixedfunction_fog(void)
         /* fog_interpolation_test shows that vertex fog evaluates the fog
          * equation in the vertex pipeline. Start = -1.0 && end = 0.0 shows
          * that the abs happens before the fog equation is evaluated. */
-        {{ 0.0f}, {1.0f}, 0x00808000},
-        {{-1.0f}, {0.0f}, 0x0000ff00},
+        {{ 0.0f}, {1.0f}, D3DFOG_LINEAR,    0x00808000},
+        {{-1.0f}, {0.0f}, D3DFOG_LINEAR,    0x0000ff00},
+        {{ 0.0f}, {1.0f}, D3DFOG_EXP,       0x009b6400},
     };
     static const D3DMATRIX proj_mat =
     {{{
@@ -17033,8 +17035,6 @@ static void test_negative_fixedfunction_fog(void)
     ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
     hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGCOLOR, 0x0000ff00);
     ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
-    hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);
-    ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
     hr = IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, &proj_mat);
     ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr);
 
@@ -17047,6 +17047,8 @@ static void test_negative_fixedfunction_fog(void)
         ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
         hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGEND, tests[i].end.d);
         ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+        hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, tests[i].vfog);
+        ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
         hr = IDirect3DDevice9_BeginScene(device);
         ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
         hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 647ec82..a1dbd5e 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -8030,6 +8030,7 @@ static void test_negative_fixedfunction_fog(void)
             float f;
             DWORD d;
         } start, end;
+        D3DFOGMODE vfog;
         DWORD color;
     }
     tests[] =
@@ -8037,8 +8038,9 @@ static void test_negative_fixedfunction_fog(void)
         /* fog_interpolation_test shows that vertex fog evaluates the fog
          * equation in the vertex pipeline. Start = -1.0 && end = 0.0 shows
          * that the abs happens before the fog equation is evaluated. */
-        {{ 0.0f}, {1.0f}, 0x00808000},
-        {{-1.0f}, {0.0f}, 0x0000ff00},
+        {{ 0.0f}, {1.0f}, D3DFOG_LINEAR,    0x00808000},
+        {{-1.0f}, {0.0f}, D3DFOG_LINEAR,    0x0000ff00},
+        {{ 0.0f}, {1.0f}, D3DFOG_EXP,       0x009b6400},
     };
     static D3DMATRIX proj_mat =
     {
@@ -8069,8 +8071,6 @@ static void test_negative_fixedfunction_fog(void)
     ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
     hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGCOLOR, 0x0000ff00);
     ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
-    hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_LINEAR);
-    ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
     hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &proj_mat);
     ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr);
 
@@ -8083,6 +8083,8 @@ static void test_negative_fixedfunction_fog(void)
         ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
         hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGEND, tests[i].end.d);
         ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+        hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, tests[i].vfog);
+        ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
         hr = IDirect3DDevice7_BeginScene(device);
         ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
         hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP,




More information about the wine-cvs mailing list