Henri Verbeet : wined3d: Check for unhandled resource usage flags.

Alexandre Julliard julliard at winehq.org
Wed May 25 11:28:13 CDT 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue May 24 21:18:52 2011 +0200

wined3d: Check for unhandled resource usage flags.

---

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

diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 5771b5b..4060bc6 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -65,6 +65,19 @@ static DWORD resource_access_from_pool(WINED3DPOOL pool)
     }
 }
 
+static void resource_check_usage(DWORD usage)
+{
+    static const DWORD handled = WINED3DUSAGE_RENDERTARGET
+            | WINED3DUSAGE_DEPTHSTENCIL
+            | WINED3DUSAGE_DYNAMIC
+            | WINED3DUSAGE_AUTOGENMIPMAP
+            | WINED3DUSAGE_STATICDECL
+            | WINED3DUSAGE_OVERLAY;
+
+    if (usage & ~handled)
+        FIXME("Unhandled usage flags %#x.\n", usage & ~handled);
+}
+
 HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
         WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format,
         WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality,
@@ -93,6 +106,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
     resource->resource_ops = resource_ops;
     list_init(&resource->privateData);
 
+    resource_check_usage(usage);
+
     if (size)
     {
         resource->heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + RESOURCE_ALIGNMENT);




More information about the wine-cvs mailing list