wined3d: Don't evict resources that are currently mapped in wined3d_device_evict_managed_resources().
This commit is contained in:
parent
5ec56c9bc4
commit
0d45d50342
|
@ -5096,7 +5096,7 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
|||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
|
||||
if (resource->pool == WINED3D_POOL_MANAGED)
|
||||
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
|
||||
{
|
||||
TRACE("Evicting %p.\n", resource);
|
||||
resource->resource_ops->resource_unload(resource);
|
||||
|
|
|
@ -171,6 +171,9 @@ void resource_cleanup(struct wined3d_resource *resource)
|
|||
|
||||
void resource_unload(struct wined3d_resource *resource)
|
||||
{
|
||||
if (resource->map_count)
|
||||
ERR("Resource %p is being unloaded while mapped.\n", resource);
|
||||
|
||||
context_resource_unloaded(resource->device,
|
||||
resource, resource->type);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue