zink: flag swapchain resources as swapchains

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:44:02 -04:00 committed by Marge Bot
parent 625457caaf
commit 4af98df955
2 changed files with 3 additions and 1 deletions

View file

@ -977,6 +977,7 @@ resource_create(struct pipe_screen *pscreen,
res->obj->vkusage = cdt->swapchain->scci.imageUsage;
res->base.b.bind |= PIPE_BIND_DISPLAY_TARGET;
res->optimal_tiling = true;
res->swapchain = true;
}
if (res->obj->is_buffer) {
res->base.buffer_id_unique = util_idalloc_mt_alloc(&screen->buffer_ids);

View file

@ -152,6 +152,7 @@ struct zink_resource {
};
};
bool swapchain;
bool dmabuf_acquire;
unsigned dt_stride;
@ -218,7 +219,7 @@ zink_resource_has_binds(const struct zink_resource *res)
static inline bool
zink_is_swapchain(const struct zink_resource *res)
{
return (res->base.b.bind & PIPE_BIND_DISPLAY_TARGET) > 0;
return res->swapchain;
}
#ifndef __cplusplus