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

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Apr 19 16:35:12 2022 -0400

zink: add a util function for finding swapchain resource

Reviewed-by: Adam Jackson <[email protected]>
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"
 

Reply via email to