Mesa (main): zink: pctx can't be null here
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 27 18:42:40 UTC 2021
Module: Mesa
Branch: main
Commit: 40f704f2f301bcfebcbd2a04600cc14293a51da7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=40f704f2f301bcfebcbd2a04600cc14293a51da7
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Thu Aug 26 11:17:21 2021 +0200
zink: pctx can't be null here
We're checking if pctx is null here, but that can't be true. If it
could, then the code that follows would have immediately crashed.
A quick peek at other drivers seems to indicate that this is a safe
assumption.
CID: 1474410, 1474554
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559>
---
src/gallium/drivers/zink/zink_fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_fence.c b/src/gallium/drivers/zink/zink_fence.c
index e0fadd86da7..8b151480874 100644
--- a/src/gallium/drivers/zink/zink_fence.c
+++ b/src/gallium/drivers/zink/zink_fence.c
@@ -206,7 +206,7 @@ zink_fence_server_sync(struct pipe_context *pctx, struct pipe_fence_handle *pfen
{
struct zink_tc_fence *mfence = zink_tc_fence(pfence);
- if (pctx && mfence->deferred_ctx == pctx)
+ if (mfence->deferred_ctx == pctx)
return;
if (mfence->deferred_ctx) {
More information about the mesa-commit
mailing list