wined3d: Assert that the BO is mapped in unmap functions.

This commit is contained in:
Zebediah Figura 2022-07-20 13:30:57 -05:00 committed by Alexandre Julliard
parent 1733f86d4a
commit b0a24c3cd7
2 changed files with 4 additions and 0 deletions

View file

@ -1064,6 +1064,8 @@ static void adapter_vk_unmap_bo_address(struct wined3d_context *context,
return;
bo = wined3d_bo_vk(data->buffer_object);
assert(bo->b.map_ptr);
if (!bo->b.coherent)
{
for (i = 0; i < range_count; ++i)

View file

@ -3039,6 +3039,8 @@ void wined3d_context_gl_unmap_bo_address(struct wined3d_context_gl *context_gl,
return;
bo = wined3d_bo_gl(data->buffer_object);
assert(bo->b.map_ptr);
flush_bo_ranges(context_gl, wined3d_const_bo_address(data), range_count, ranges);
wined3d_bo_gl_unmap(bo, context_gl);
}