Mesa (main): dzn: Fix the STATIC_ASSERT() in dzn_meta_blits_get_context()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 22 20:50:54 UTC 2022


Module: Mesa
Branch: main
Commit: 1999e927b017cc3bb9ae6cd9726dd587665e8ab8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1999e927b017cc3bb9ae6cd9726dd587665e8ab8

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>

---

 src/microsoft/vulkan/dzn_meta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microsoft/vulkan/dzn_meta.c b/src/microsoft/vulkan/dzn_meta.c
index d0e88dbab9b..6ea2ae6cb16 100644
--- a/src/microsoft/vulkan/dzn_meta.c
+++ b/src/microsoft/vulkan/dzn_meta.c
@@ -644,7 +644,7 @@ dzn_meta_blits_get_context(struct dzn_device *device,
 {
    struct 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