zink: add a util function for finding swapchain resource

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
This commit is contained in:
Mike Blumenkrantz 2022-04-19 16:35:12 -04:00 committed by Marge Bot
parent 8d73315bce
commit b86c814347

View file

@ -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"