Mesa (staging/21.3): zink: stop using VK_IMAGE_LAYOUT_PREINITIALIZED for dmabuf

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 19:01:42 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: a0fe0e094e56a7b7b2456ff829a3ef4848f070d5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0fe0e094e56a7b7b2456ff829a3ef4848f070d5

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Nov 11 12:11:33 2021 -0500

zink: stop using VK_IMAGE_LAYOUT_PREINITIALIZED for dmabuf

this is illegal

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13799>
(cherry picked from commit 11c79a8bd79178ab027438b018379051e33430c8)

---

 .pick_status.json                        | 2 +-
 src/gallium/drivers/zink/zink_resource.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index eefe31ac66c..3b5fd233842 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -310,7 +310,7 @@
         "description": "zink: stop using VK_IMAGE_LAYOUT_PREINITIALIZED for dmabuf",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 39d3749bff1..4549874a8e3 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -372,7 +372,7 @@ create_ici(struct zink_screen *screen, VkImageCreateInfo *ici, const struct pipe
    ici->samples = templ->nr_samples ? templ->nr_samples : VK_SAMPLE_COUNT_1_BIT;
    ici->tiling = modifiers_count ? VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT : bind & PIPE_BIND_LINEAR ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
    ici->sharingMode = VK_SHARING_MODE_EXCLUSIVE;
-   ici->initialLayout = dmabuf ? VK_IMAGE_LAYOUT_PREINITIALIZED : VK_IMAGE_LAYOUT_UNDEFINED;
+   ici->initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
 
    /* sampleCounts will be set to VK_SAMPLE_COUNT_1_BIT if at least one of the following conditions is true:
     * - flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT



More information about the mesa-commit mailing list