Commit cc0c7d72 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Prefer bind flags over usage flags in d3d9_device_ColorFill().

parent 86a0f486
...@@ -1750,13 +1750,13 @@ static HRESULT WINAPI d3d9_device_ColorFill(IDirect3DDevice9Ex *iface, ...@@ -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); WARN("Colour fills are not allowed on surfaces with resource access %#x.\n", desc.access);
return D3DERR_INVALIDCALL; 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(); wined3d_mutex_unlock();
WARN("Colorfill is not allowed on non-RT textures, returning D3DERR_INVALIDCALL.\n"); WARN("Colorfill is not allowed on non-RT textures, returning D3DERR_INVALIDCALL.\n");
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
if (desc.usage & WINED3DUSAGE_DEPTHSTENCIL) if (desc.bind_flags & WINED3D_BIND_DEPTH_STENCIL)
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
WARN("Colorfill is not allowed on depth stencil surfaces, returning D3DERR_INVALIDCALL.\n"); WARN("Colorfill is not allowed on depth stencil surfaces, returning D3DERR_INVALIDCALL.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment