Henri Verbeet : wined3d: Use the resource access flags in resource_cleanup ().

Alexandre Julliard julliard at winehq.org
Wed Jan 31 15:23:28 CST 2018


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Jan 31 19:07:37 2018 +0330

wined3d: Use the resource access flags in resource_cleanup().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 172a054..44f9f00 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -262,7 +262,7 @@ void resource_cleanup(struct wined3d_resource *resource)
 
     if (!(resource->usage & WINED3DUSAGE_PRIVATE))
     {
-        if (resource->pool == WINED3D_POOL_DEFAULT && d3d->flags & WINED3D_VIDMEM_ACCOUNTING)
+        if (!(resource->access & WINED3D_RESOURCE_ACCESS_CPU) && d3d->flags & WINED3D_VIDMEM_ACCOUNTING)
         {
             TRACE("Decrementing device memory pool by %u.\n", resource->size);
             adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);




More information about the wine-cvs mailing list