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

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-01-31 18:49:37 +03:30 committed by Alexandre Julliard
parent 7ef8b31965
commit d099e45e46
1 changed files with 1 additions and 1 deletions

View File

@ -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);