[PATCH 4/5] d3d9: Prefer bind flags over usage flags in d3d9_device_ColorFill().
Henri Verbeet
hverbeet at codeweavers.com
Mon Nov 5 05:43:56 CST 2018
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/d3d9/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index e5135496453..1e7c0ea0f45 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1750,13 +1750,13 @@ static HRESULT WINAPI d3d9_device_ColorFill(IDirect3DDevice9Ex *iface,
WARN("Colour fills are not allowed on surfaces with resource access %#x.\n", desc.access);
return D3DERR_INVALIDCALL;
}
- if ((desc.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_TEXTURE)) == WINED3DUSAGE_TEXTURE)
+ if ((desc.bind_flags & (WINED3D_BIND_RENDER_TARGET | WINED3D_BIND_SHADER_RESOURCE)) == WINED3D_BIND_SHADER_RESOURCE)
{
wined3d_mutex_unlock();
WARN("Colorfill is not allowed on non-RT textures, returning D3DERR_INVALIDCALL.\n");
return D3DERR_INVALIDCALL;
}
- if (desc.usage & WINED3DUSAGE_DEPTHSTENCIL)
+ if (desc.bind_flags & WINED3D_BIND_DEPTH_STENCIL)
{
wined3d_mutex_unlock();
WARN("Colorfill is not allowed on depth stencil surfaces, returning D3DERR_INVALIDCALL.\n");
--
2.11.0
More information about the wine-devel
mailing list