Mesa (main): zink: fix coverage check for texture clears
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 18 03:57:15 UTC 2022
Module: Mesa
Branch: main
Commit: 04a5471b5e3b4e8e944ffdc136fe2ae0a119bdc8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=04a5471b5e3b4e8e944ffdc136fe2ae0a119bdc8
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Jul 5 15:40:29 2022 -0400
zink: fix coverage check for texture clears
this wasn't actively harmful, but it was potentially differently-performant
Acked-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
---
src/gallium/drivers/zink/zink_clear.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_clear.c b/src/gallium/drivers/zink/zink_clear.c
index baf11a7f23f..87a985e4fc8 100644
--- a/src/gallium/drivers/zink/zink_clear.c
+++ b/src/gallium/drivers/zink/zink_clear.c
@@ -403,7 +403,7 @@ zink_clear_texture(struct pipe_context *pctx,
struct zink_context *ctx = zink_context(pctx);
struct zink_resource *res = zink_resource(pres);
struct u_rect region = zink_rect_from_box(box);
- bool needs_rp = !zink_blit_region_fills(region, pres->width0, pres->height0) || ctx->render_condition_active;
+ bool needs_rp = !zink_blit_region_fills(region, u_minify(pres->width0, level), u_minify(pres->height0, level)) || ctx->render_condition_active;
struct pipe_surface *surf = NULL;
if (res->aspect & VK_IMAGE_ASPECT_COLOR_BIT) {
More information about the mesa-commit
mailing list