Skip to content
Snippets Groups Projects
Commit 474ed4b8 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Marge Bot
Browse files

zink: use actual swapchain object for surface comparison

the outer swapchain object is persistent, which means checking it
will never yield an update after the first check

fixes #8122

Fixes: b2739c9f ("zink: set surface->dt when updating swapchain"
Part-of: <mesa/mesa!20814>
parent 26e4621f
No related merge requests found
......@@ -451,7 +451,7 @@ zink_surface_swapchain_update(struct zink_context *ctx, struct zink_surface *sur
struct kopper_displaytarget *cdt = res->obj->dt;
if (!cdt)
return; //dead swapchain
if (res->obj->dt != surface->dt) {
if (cdt->swapchain != surface->dt_swapchain) {
/* new swapchain: clear out previous swapchain imageviews/array and setup a new one;
* old views will be pruned normally in zink_batch or on object destruction
*/
......@@ -465,7 +465,7 @@ zink_surface_swapchain_update(struct zink_context *ctx, struct zink_surface *sur
surface->base.width = res->base.b.width0;
surface->base.height = res->base.b.height0;
init_surface_info(surface, res, &surface->ivci);
surface->dt = res->obj->dt;
surface->dt_swapchain = cdt->swapchain;
}
if (!surface->swapchain[res->obj->dt_idx]) {
/* no current swapchain imageview exists: create it */
......
......@@ -1383,7 +1383,7 @@ struct zink_surface {
VkImageView *swapchain;
unsigned swapchain_size;
void *obj; //backing resource object; used to determine rebinds
void *dt; //current swapchain object; used to determine swapchain rebinds
void *dt_swapchain; //current swapchain object; used to determine swapchain rebinds
uint32_t hash; //for surface caching
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment