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

Alexandre Julliard julliard at winehq.org
Fri Jul 22 15:38:24 CDT 2022


Module: wine
Branch: master
Commit: b0a24c3cd7a10f41d3c0f45b813c17a999ae03aa
URL:    https://gitlab.winehq.org/wine/wine/-/commit/b0a24c3cd7a10f41d3c0f45b813c17a999ae03aa

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Wed Jul 20 13:30:57 2022 -0500

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

---

 dlls/wined3d/adapter_vk.c | 2 ++
 dlls/wined3d/context_gl.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c
index 81248d40f46..58671cfb5f9 100644
--- a/dlls/wined3d/adapter_vk.c
+++ b/dlls/wined3d/adapter_vk.c
@@ -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)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 7679a0ffb20..7f7324c8b91 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -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);
 }




More information about the wine-cvs mailing list