d3d12: Avoid a debug warning trying to unmap a not-mapped resource
Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294>
This commit is contained in:
@@ -218,7 +218,8 @@ d3d12_buffer_destroy(void *winsys, struct pb_buffer *pbuf)
|
||||
{
|
||||
struct d3d12_buffer *buf = d3d12_buffer(pbuf);
|
||||
|
||||
d3d12_bo_unmap(buf->bo, &buf->range);
|
||||
if (buf->map)
|
||||
d3d12_bo_unmap(buf->bo, &buf->range);
|
||||
d3d12_bo_unreference(buf->bo);
|
||||
FREE(buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user