mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
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:b2739c9f00("zink: set surface->dt when updating swapchain" Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20814> (cherry picked from commit474ed4b877)
This commit is contained in:
parent
d240b30e35
commit
4502264786
3 changed files with 4 additions and 4 deletions
|
|
@ -1642,7 +1642,7 @@
|
|||
"description": "zink: use actual swapchain object for surface comparison",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "b2739c9f00557347008dfc500dcc584abb81378b"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -1325,7 +1325,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
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue