Mesa (staging/22.1): vulkan/wsi: Pass the size to MapMemory in the SW path

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 12 17:20:15 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 2b157e92d75cafb39b64ab19e26c3c57a06de1e0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b157e92d75cafb39b64ab19e26c3c57a06de1e0

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Tue Jul  5 17:24:50 2022 -0500

vulkan/wsi: Pass the size to MapMemory in the SW path

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>
(cherry picked from commit ca6bd57e7643358fefd766883c8bb323e48777f3)

---

 .pick_status.json                   | 2 +-
 src/vulkan/wsi/wsi_common_wayland.c | 2 +-
 src/vulkan/wsi/wsi_common_x11.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 1fac486f0de..9a391b04213 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2083,7 +2083,7 @@
         "description": "vulkan/wsi: Pass the size to MapMemory in the SW path",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index 0678556105e..8d78f9f155a 100644
--- a/src/vulkan/wsi/wsi_common_wayland.c
+++ b/src/vulkan/wsi/wsi_common_wayland.c
@@ -1049,7 +1049,7 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain,
       void *sptr;
       chain->base.wsi->MapMemory(chain->base.device,
                                  image->base.memory,
-                                 0, 0, 0, &sptr);
+                                 0, VK_WHOLE_SIZE, 0, &sptr);
 
       for (unsigned r = 0; r < chain->extent.height; r++) {
          memcpy(dptr, sptr, image->base.row_pitches[0]);
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 96e0be3d62a..7422cee1431 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1276,7 +1276,7 @@ x11_present_to_x11_sw(struct x11_swapchain *chain, uint32_t image_index,
 
    chain->base.wsi->MapMemory(chain->base.device,
                               image->base.memory,
-                              0, 0, 0, &myptr);
+                              0, VK_WHOLE_SIZE, 0, &myptr);
 
    if (size < max_req_len) {
       cookie = xcb_put_image(chain->conn, XCB_IMAGE_FORMAT_Z_PIXMAP,



More information about the mesa-commit mailing list