Mesa (main): zink: cast pointers to uintptr_t
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 18:15:27 UTC 2021
Module: Mesa
Branch: main
Commit: f815026d36f32a83326b09113ed28ff3263bb7a0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f815026d36f32a83326b09113ed28ff3263bb7a0
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Thu Jun 24 13:30:20 2021 +0200
zink: cast pointers to uintptr_t
The way p_atomic_cmpxchg is implemented on Windows really wants us to
use integers instead of things like pointers. So let's use uintptr_t
here. It seems cleaner to use that than the value zero for the last
argument, because it shows the intent of the code more clearly.
Fixes: d80d9e1c935 ("zink: queue v3.0")
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11424>
---
src/gallium/drivers/zink/zink_batch.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_batch.h b/src/gallium/drivers/zink/zink_batch.h
index 02178c03e1e..0baed1c5da7 100644
--- a/src/gallium/drivers/zink/zink_batch.h
+++ b/src/gallium/drivers/zink/zink_batch.h
@@ -189,7 +189,7 @@ zink_batch_usage_is_unflushed(const struct zink_batch_usage *u)
static inline void
zink_batch_usage_unset(struct zink_batch_usage **u, struct zink_batch_state *bs)
{
- (void)p_atomic_cmpxchg(u, &bs->usage, NULL);
+ (void)p_atomic_cmpxchg((uintptr_t *)u, (uintptr_t)&bs->usage, (uintptr_t)NULL);
}
static inline void
More information about the mesa-commit
mailing list