[PATCH 4/5] wined3d: Call the unmap_upload_bo callback in wined3d_device_context_emit_update_sub_resource().

Zebediah Figura zfigura at codeweavers.com
Wed Sep 29 17:15:23 CDT 2021


We will need to mark the resource as no longer mapped, from the client's
perspective.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/wined3d/cs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index c3b0343bed2..4456f84f0a3 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2730,6 +2730,7 @@ void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_conte
         const void *data, unsigned int row_pitch, unsigned int slice_pitch)
 {
     struct wined3d_cs_update_sub_resource *op;
+    struct wined3d_box dummy_box;
     struct upload_bo bo;
     void *map_ptr;
 
@@ -2738,6 +2739,7 @@ void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_conte
     {
         wined3d_format_copy_data(resource->format, data, row_pitch, slice_pitch, map_ptr, row_pitch, slice_pitch,
                 box->right - box->left, box->bottom - box->top, box->back - box->front);
+        context->ops->unmap_upload_bo(context, resource, sub_resource_idx, &dummy_box, &bo);
         wined3d_device_context_upload_bo(context, resource, sub_resource_idx, box, &bo, row_pitch, slice_pitch);
         return;
     }
-- 
2.33.0




More information about the wine-devel mailing list