d3d9: Prefer bind flags over usage flags in d3d9_device_ColorFill().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
86a0f486c6
commit
cc0c7d727b
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue