Henri Verbeet : wined3d: Ignore the blitter's depth/ colour fill return value in wined3d_device_clear_rendertarget_view().

Alexandre Julliard julliard at winehq.org
Mon Apr 3 14:01:46 CDT 2017


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Apr  3 07:39:43 2017 +0200

wined3d: Ignore the blitter's depth/colour fill return value in wined3d_device_clear_rendertarget_view().

Direct3D 10 and later don't have a return value, earlier versions seem to
claim success even if the fill/clear is unsupported.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d9/tests/visual.c | 13 +++++--------
 dlls/wined3d/device.c    |  6 ++++--
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 59a2e7d..5f96cc3 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1310,8 +1310,7 @@ static void color_fill_test(void)
         enum
         {
             CHECK_FILL_VALUE = 0x1,
-            TODO_FILL_RETURN = 0x2,
-            BLOCKS           = 0x4,
+            BLOCKS           = 0x2,
         } flags;
         DWORD fill_value;
     }
@@ -1337,7 +1336,7 @@ static void color_fill_test(void)
          * result on Wine.
          * {D3DFMT_YUY2,     "D3DFMT_YUY2",     BLOCKS,                              0},
          * {D3DFMT_UYVY,     "D3DFMT_UYVY",     BLOCKS,                              0}, */
-        {D3DFMT_DXT1,     "D3DFMT_DXT1",     BLOCKS | TODO_FILL_RETURN,           0},
+        {D3DFMT_DXT1,     "D3DFMT_DXT1",     BLOCKS,                              0x00000000},
         /* Vendor-specific formats like ATI2N are a non-issue here since they're not
          * supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
          * when created as texture. */
@@ -1447,18 +1446,16 @@ static void color_fill_test(void)
         ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, fmt=%s.\n", hr, formats[i].name);
 
         hr = IDirect3DDevice9_ColorFill(device, surface, NULL, 0xdeadbeef);
-        todo_wine_if (formats[i].flags & TODO_FILL_RETURN)
-            ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
+        ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
 
         hr = IDirect3DDevice9_ColorFill(device, surface, &rect, 0xdeadbeef);
-        todo_wine_if (formats[i].flags & TODO_FILL_RETURN)
-            ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
+        ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
 
         if (SUCCEEDED(hr))
         {
             hr = IDirect3DDevice9_ColorFill(device, surface, &rect2, 0xdeadbeef);
             if (formats[i].flags & BLOCKS)
-                todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
+                ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
             else
                 ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
         }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3b50e48..618e289 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4197,9 +4197,11 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
     }
 
     if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
-        return blitter->color_fill(device, view, rect, color);
+        blitter->color_fill(device, view, rect, color);
     else
-        return blitter->depth_fill(device, view, rect, flags, depth, stencil);
+        blitter->depth_fill(device, view, rect, flags, depth, stencil);
+
+    return WINED3D_OK;
 }
 
 struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,




More information about the wine-cvs mailing list