Mesa (main): Zink: Fix clear being missed when using emulated draws in zink_blit
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 20 00:54:18 UTC 2022
Module: Mesa
Branch: main
Commit: 2159a377c0f2b5db9af0f6e283b6bb7205eac715
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2159a377c0f2b5db9af0f6e283b6bb7205eac715
Author: SoroushIMG <soroush.kashani at imgtec.com>
Date: Tue Jul 19 14:50:11 2022 +0100
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 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17631>
---
src/gallium/drivers/zink/zink_blit.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c
index ef22fc30655..1b3a3875cac 100644
--- a/src/gallium/drivers/zink/zink_blit.c
+++ b/src/gallium/drivers/zink/zink_blit.c
@@ -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
*/
More information about the mesa-commit
mailing list