mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
zink: only update swapchain readback cache on create if necessary
minor optimization Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
This commit is contained in:
parent
417a1986fb
commit
8fb83c0935
1 changed files with 1 additions and 1 deletions
|
|
@ -877,7 +877,7 @@ zink_kopper_acquire_readback(struct zink_context *ctx, struct zink_resource *res
|
|||
VkResult ret = VK_SUCCESS;
|
||||
|
||||
if (++cdt->readback_counter >= ZINK_READBACK_THRESHOLD) {
|
||||
if (kopper_ensure_readback(screen, res))
|
||||
if (kopper_ensure_readback(screen, res) && cswap->images[res->obj->dt_idx].readback_needs_update)
|
||||
zink_kopper_readback_update(ctx, res);
|
||||
}
|
||||
/* if this hasn't been presented or if it has data, use this as the readback target */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue