mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
wined3d: Enforce WINED3DUSAGE_DEPTHSTENCIL format restrictions on resource creation.
This commit is contained in:
parent
b28e9f6482
commit
ad178a5b55
@ -90,6 +90,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
{
|
||||
if ((usage & WINED3DUSAGE_RENDERTARGET) && !(format->flags & WINED3DFMT_FLAG_RENDERTARGET))
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
if ((usage & WINED3DUSAGE_DEPTHSTENCIL) && !(format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)))
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
resource->ref = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user