[PATCH 3/5] wined3d: Enforce WINED3DUSAGE_DEPTHSTENCIL format restrictions on resource creation.
Henri Verbeet
hverbeet at codeweavers.com
Thu Sep 5 02:54:41 CDT 2013
---
dlls/wined3d/resource.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 6138764..e97af48 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -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;
--
1.8.1.5
More information about the wine-patches
mailing list