Module: wine Branch: refs/heads/master Commit: e0c87731996190c9528445f2f1ba2f6ed995d566 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e0c87731996190c9528445f2...
Author: Stefan Dösinger stefan@codeweavers.com Date: Mon Apr 10 19:39:53 2006 +0200
wined3d: Add a resource dumper.
---
dlls/wined3d/device.c | 4 ---- dlls/wined3d/resource.c | 8 ++++++++ dlls/wined3d/wined3d_private.h | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4385b24..71147f8 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -434,11 +434,7 @@ ULONG WINAPI IWineD3DDeviceImpl_Release(
if (This->resources != NULL ) { FIXME("(%p) Device released with resources still bound, acceptable but unexpected\n", This); - -#if 0 /* TODO: Dump a list of all the resources still bound */ dumpResources(This->resources); -#endif - /* TODO: set the resources to a lost state */ }
} diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index be43046..5a4b550 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -230,6 +230,14 @@ HRESULT WINAPI IWineD3DResourceImpl_GetP return WINED3D_OK; }
+void dumpResources(ResourceList *resources) { + ResourceList *iterator = resources; + + while(iterator) { + FIXME("Leftover resource %p with type %d,%s\n", iterator->resource, IWineD3DResource_GetType(iterator->resource), debug_d3dresourcetype(IWineD3DResource_GetType(iterator->resource))); + iterator = iterator->next; + } +}
static const IWineD3DResourceVtbl IWineD3DResource_Vtbl = { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d5d5cce..4ea820e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -488,6 +488,9 @@ typedef struct ResourceList { struct ResourceList *next; } ResourceList;
+/* A helper function that dumps a resource list */ +void dumpResources(ResourceList *resources); + /***************************************************************************** * IWineD3DDevice implementation structure */