Mesa (staging/22.1): dzn: Fix the STATIC_ASSERT() in dzn_meta_blits_get_context()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 25 04:07:33 UTC 2022


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

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Apr 22 11:01:00 2022 -0700

dzn: Fix the STATIC_ASSERT() in dzn_meta_blits_get_context()

We care about the object key size, not the size of a pointer.

Fixes: a012b219640 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16109>
(cherry picked from commit 1999e927b017cc3bb9ae6cd9726dd587665e8ab8)

---

 .pick_status.json                 | 2 +-
 src/microsoft/vulkan/dzn_meta.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 71551fb051c..3718ec99977 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -445,7 +445,7 @@
         "description": "dzn: Fix the STATIC_ASSERT() in dzn_meta_blits_get_context()",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "a012b219640e875aa552b37dfdaf69336d5863c7"
     },
diff --git a/src/microsoft/vulkan/dzn_meta.cpp b/src/microsoft/vulkan/dzn_meta.cpp
index 09986658be3..9afcb5b7db1 100644
--- a/src/microsoft/vulkan/dzn_meta.cpp
+++ b/src/microsoft/vulkan/dzn_meta.cpp
@@ -623,7 +623,7 @@ dzn_meta_blits_get_context(dzn_device *device,
 {
    dzn_meta_blit *out = NULL;
 
-   STATIC_ASSERT(sizeof(key) == sizeof(uint64_t));
+   STATIC_ASSERT(sizeof(*key) == sizeof(uint64_t));
 
    mtx_lock(&device->blits.contexts_lock);
 



More information about the mesa-commit mailing list