wined3d: Add a resource dumper.

This commit is contained in:
Stefan Dösinger 2006-04-10 19:39:53 +02:00 committed by Alexandre Julliard
parent 6e4b960a1c
commit e0c8773199
3 changed files with 11 additions and 4 deletions

View File

@ -434,11 +434,7 @@ ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
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 */
}
}

View File

@ -230,6 +230,14 @@ HRESULT WINAPI IWineD3DResourceImpl_GetParent(IWineD3DResource *iface, IUnknown
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 =
{

View File

@ -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
*/