Henri Verbeet : wined3d: Enforce WINED3DUSAGE_DEPTHSTENCIL format restrictions on resource creation .

Alexandre Julliard julliard at winehq.org
Thu Sep 5 13:28:19 CDT 2013


Module: wine
Branch: master
Commit: ad178a5b55a4ca0e9c9a288baecfba9c17120860
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ad178a5b55a4ca0e9c9a288baecfba9c17120860

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Sep  5 09:54:41 2013 +0200

wined3d: Enforce WINED3DUSAGE_DEPTHSTENCIL format restrictions on resource creation.

---

 dlls/wined3d/resource.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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;




More information about the wine-cvs mailing list