Mesa (main): vulkan/wsi: Pass the size to MapMemory in the SW path
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 7 18:47:58 UTC 2022
Module: Mesa
Branch: main
Commit: ca6bd57e7643358fefd766883c8bb323e48777f3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca6bd57e7643358fefd766883c8bb323e48777f3
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>
---
src/vulkan/wsi/wsi_common_wayland.c | 2 +-
src/vulkan/wsi/wsi_common_x11.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index ce7da864cc5..ae9eb18b87c 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 6992a490a4b..609da7f71f9 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1298,7 +1298,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