Zink: Fix clear being missed when using emulated draws in zink_blit

zink_kopper_acquire_readback will flush any outstanding clears, this means that
the current clears need to be applied first before calling zink_kopper_acquire_readback.
This was already done for native_blit and native_resolve, also do this for the emulated draw path.
Seen as intermittent failures in cts case GTF-GL33.gtf21.GL2FixedTests.buffer_clear.buffer_clear.

Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17631>
This commit is contained in:
SoroushIMG 2022-07-19 14:50:11 +01:00 committed by Marge Bot
parent 3dfd8e4d7d
commit 2159a377c0

View file

@ -334,8 +334,11 @@ zink_blit(struct pipe_context *pctx,
}
}
if (src->obj->dt)
if (src->obj->dt) {
zink_fb_clears_apply_region(ctx, info->src.resource, zink_rect_from_box(&info->src.box));
needs_present_readback = zink_kopper_acquire_readback(ctx, src);
}
/* this is discard_only because we're about to start a renderpass that will
* flush all pending clears anyway
*/