Stefan Doesinger : wined3d: Implement EvictManagedResources.
Alexandre Julliard
julliard at winehq.org
Fri Jun 19 08:27:16 CDT 2009
Module: wine
Branch: master
Commit: 0188f96dd2b9f6e32845920f6fb4f73862ef45c4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0188f96dd2b9f6e32845920f6fb4f73862ef45c4
Author: Stefan Doesinger <stefan at codeweavers.com>
Date: Tue Jun 9 23:06:06 2009 -0700
wined3d: Implement EvictManagedResources.
---
dlls/wined3d/device.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5378568..04a453e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6856,14 +6856,21 @@ static HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice*
return WINED3DERR_DRIVERINTERNALERROR;
}
+static HRESULT WINAPI evict_managed_resource(IWineD3DResource *resource, void *data) {
+ TRACE("checking resource %p for eviction\n", resource);
+ if(((IWineD3DResourceImpl *) resource)->resource.pool == WINED3DPOOL_MANAGED) {
+ TRACE("Evicting %p\n", resource);
+ IWineD3DResource_UnLoad(resource);
+ }
+ IWineD3DResource_Release(resource);
+ return S_OK;
+}
static HRESULT WINAPI IWineD3DDeviceImpl_EvictManagedResources(IWineD3DDevice* iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
- /** FIXME: Resource tracking needs to be done,
- * The closes we can do to this is set the priorities of all managed textures low
- * and then reset them.
- ***********************************************************/
- FIXME("(%p) : stub\n", This);
+ TRACE("(%p)\n", This);
+
+ IWineD3DDevice_EnumResources(iface, evict_managed_resource, NULL);
return WINED3D_OK;
}
More information about the wine-cvs
mailing list