mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 10:40:36 +01:00
zink: flag swapchains when updating fails
these are dead, they just don't know it yet Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
This commit is contained in:
parent
e1706c29c6
commit
8bae419dfe
2 changed files with 6 additions and 0 deletions
|
|
@ -497,6 +497,10 @@ zink_kopper_acquire(struct zink_context *ctx, struct zink_resource *res, uint64_
|
|||
{
|
||||
assert(res->obj->dt);
|
||||
struct kopper_displaytarget *cdt = kopper_displaytarget(res->obj->dt);
|
||||
if (cdt->is_kill) {
|
||||
kill_swapchain(ctx, res);
|
||||
return false;
|
||||
}
|
||||
const struct kopper_swapchain *cswap = cdt->swapchain;
|
||||
res->obj->new_dt |= res->base.b.width0 != cswap->scci.imageExtent.width ||
|
||||
res->base.b.height0 != cswap->scci.imageExtent.height;
|
||||
|
|
@ -722,6 +726,7 @@ zink_kopper_update(struct pipe_screen *pscreen, struct pipe_resource *pres, int
|
|||
}
|
||||
if (update_caps(screen, cdt) != VK_SUCCESS) {
|
||||
mesa_loge("zink: failed to update swapchain capabilities");
|
||||
cdt->is_kill = true;
|
||||
return false;
|
||||
}
|
||||
*w = cdt->caps.currentExtent.width;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ struct kopper_displaytarget
|
|||
VkSurfaceCapabilitiesKHR caps;
|
||||
VkImageFormatListCreateInfoKHR format_list;
|
||||
enum kopper_type type;
|
||||
bool is_kill;
|
||||
};
|
||||
|
||||
struct zink_context;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue