[PATCH 2/3] wined3d: Set resource->client.addr in buffer_resource_sub_resource_map() only if persistently mapping.

Zebediah Figura zfigura at codeweavers.com
Wed Feb 9 20:27:35 CST 2022


Be consistent with wined3d_cs_map_upload_bo(). This may change in the future,
but for now we depend on this logic in the Vulkan backend.

This fixes test_dynamic_map_synchronization() on 32-bit architectures with the
Vulkan backend, which is currently broken because we try to perform accelerated
NOOVERWRITE maps while unmapping the same BOs.

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

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 2f3b5fd316e..a06bfb984ad 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1002,7 +1002,8 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
              * but it's safe because the client thread will wait for the
              * map to return, thus completely serializing this call with
              * other client code. */
-            buffer->resource.client.addr = addr;
+            if (wined3d_map_persistent())
+                buffer->resource.client.addr = addr;
 
             if (((DWORD_PTR)buffer->map_ptr) & (RESOURCE_ALIGNMENT - 1))
             {
-- 
2.34.1




More information about the wine-devel mailing list