Mesa (main): zink: add a util function for finding swapchain resource
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 27 22:20:25 UTC 2022
Module: Mesa
Branch: main
Commit: b86c81434755319edde8c25760ea977a3d318ea2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b86c81434755319edde8c25760ea977a3d318ea2
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Apr 19 16:35:12 2022 -0400
zink: add a util function for finding swapchain resource
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
---
src/gallium/drivers/zink/zink_resource.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_resource.h b/src/gallium/drivers/zink/zink_resource.h
index 2b6de9a7170..fd04c950931 100644
--- a/src/gallium/drivers/zink/zink_resource.h
+++ b/src/gallium/drivers/zink/zink_resource.h
@@ -215,6 +215,12 @@ zink_resource_has_binds(const struct zink_resource *res)
return res->all_binds > 0;
}
+static inline bool
+zink_is_swapchain(const struct zink_resource *res)
+{
+ return (res->base.b.bind & PIPE_BIND_DISPLAY_TARGET) > 0;
+}
+
#ifndef __cplusplus
#include "zink_bo.h"
More information about the mesa-commit
mailing list