zink: fix swapchain readback conditional

this check is intended to determine whether the current backbuffer has
data, which correlates to (is_acquired && has_data). here, that corresponds
better to checking for a valid image index && nonzero buffer age

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
This commit is contained in:
Mike Blumenkrantz 2024-02-14 15:57:59 -05:00
parent 50b671c1c3
commit 9fa2d9bd50

View file

@ -859,7 +859,7 @@ zink_kopper_acquire_readback(struct zink_context *ctx, struct zink_resource *res
/* if this hasn't been presented or if it has data, use this as the readback target */
if (res->obj->last_dt_idx == UINT32_MAX ||
(zink_kopper_acquired(cdt, res->obj->dt_idx) && cdt->swapchain->images[res->obj->dt_idx].dt_has_data)) {
(res->obj->dt_idx != UINT32_MAX && cdt->swapchain->images[res->obj->dt_idx].age)) {
*readback = res;
return false;
}