Module: wine Branch: master Commit: 1733f86d4afef9449cab3499058be3f16eea27e1 URL: https://gitlab.winehq.org/wine/wine/-/commit/1733f86d4afef9449cab3499058be3f...
Author: Zebediah Figura zfigura@codeweavers.com Date: Wed Jul 20 13:30:30 2022 -0500
wined3d: Do not try to unmap already unmapped BOs in wined3d_texture_update_sub_resource().
---
dlls/wined3d/texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 50049f96d71..39ef6376203 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -4737,7 +4737,8 @@ void wined3d_texture_update_sub_resource(struct wined3d_texture *texture, unsign wined3d_texture_validate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER); wined3d_texture_invalidate_location(texture, sub_resource_idx, ~WINED3D_LOCATION_BUFFER); /* Try to free address space if we are not mapping persistently. */ - wined3d_context_unmap_bo_address(context, (const struct wined3d_bo_address *)&upload_bo->addr, 0, NULL); + if (upload_bo->addr.buffer_object->map_ptr) + wined3d_context_unmap_bo_address(context, (const struct wined3d_bo_address *)&upload_bo->addr, 0, NULL); }
/* Only load the sub-resource for partial updates. */