From 2f84616e02e876d71d3871dd17ef3d9db6c043bb Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 14 Jul 2023 18:46:05 -0500 Subject: [PATCH] wined3d: Avoid uploading deferred context maps more than once. --- dlls/wined3d/cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 029ca5d884d..5fc2bf64074 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -4211,7 +4211,7 @@ static bool wined3d_deferred_context_unmap_upload_bo(struct wined3d_device_conte struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_box *box, struct upload_bo *bo) { struct wined3d_deferred_context *deferred = wined3d_deferred_context_from_context(context); - const struct wined3d_deferred_upload *upload; + struct wined3d_deferred_upload *upload; if ((upload = deferred_context_get_upload(deferred, resource, sub_resource_idx))) { @@ -4219,6 +4219,7 @@ static bool wined3d_deferred_context_unmap_upload_bo(struct wined3d_device_conte bo->addr.buffer_object = 0; bo->addr.addr = (uint8_t *)align((size_t)upload->sysmem, RESOURCE_ALIGNMENT); bo->flags = upload->upload_flags; + upload->upload_flags = 0; return true; } -- 2.11.4.GIT