From 0da7187d18669156e01a7b283c11e4018c14e06f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 28 Aug 2015 00:01:39 +0200
Subject: wined3d: Hack to reject unsupported color fills.

---
 dlls/wined3d/surface.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 7cf6bbf..2ac583d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5021,6 +5021,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
         }
     }
 
+    /* FIXME: We should select the blitter in the main thread, that way we can return an error if the blit
+     * is unsupported without duplicating all the checks... */
+    if (flags & WINED3D_BLT_COLOR_FILL && (dst_surface->container->resource.format_flags & WINED3DFMT_FLAG_BLOCKS))
+    {
+        WARN("Block color fill, returning WINED3DERR_INVALIDCALL\n");
+        return WINED3DERR_INVALIDCALL;
+    }
+
     if (!fx || !(fx->fx))
         flags &= ~WINED3D_BLT_FX;
 
-- 
2.7.1

