mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
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:
parent
0c5fde39e4
commit
5c69c44a99
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue