Mesa (staging/21.2): zink: don't break early when applying fb clears
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 27 21:53:15 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 34ddc2a5b59c78bb1032f54e0a100ff55239ecdf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=34ddc2a5b59c78bb1032f54e0a100ff55239ecdf
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Oct 22 14:24:48 2021 -0400
zink: don't break early when applying fb clears
a resource can be bound to multiple fb attachments, each with
its own clear, so ensure that all of these are applied
fixes #5542
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13491>
(cherry picked from commit dabe477b4f273964afedab2fce2be22f2617268f)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_clear.c | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 8ebde23fc76..5e5ae3fbf57 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -382,7 +382,7 @@
"description": "zink: don't break early when applying fb clears",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/zink/zink_clear.c b/src/gallium/drivers/zink/zink_clear.c
index 09be568af58..f7fcb613f61 100644
--- a/src/gallium/drivers/zink/zink_clear.c
+++ b/src/gallium/drivers/zink/zink_clear.c
@@ -596,7 +596,6 @@ zink_fb_clears_apply(struct zink_context *ctx, struct pipe_resource *pres)
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) {
if (ctx->fb_state.cbufs[i] && ctx->fb_state.cbufs[i]->texture == pres) {
fb_clears_apply_internal(ctx, pres, i);
- return;
}
}
} else {
@@ -614,7 +613,6 @@ zink_fb_clears_discard(struct zink_context *ctx, struct pipe_resource *pres)
if (ctx->fb_state.cbufs[i] && ctx->fb_state.cbufs[i]->texture == pres) {
if (zink_fb_clear_enabled(ctx, i)) {
zink_fb_clear_reset(ctx, i);
- return;
}
}
}
@@ -688,7 +686,6 @@ zink_fb_clears_apply_or_discard(struct zink_context *ctx, struct pipe_resource *
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) {
if (ctx->fb_state.cbufs[i] && ctx->fb_state.cbufs[i]->texture == pres) {
fb_clears_apply_or_discard_internal(ctx, pres, region, discard_only, false, i);
- return;
}
}
} else {
@@ -705,7 +702,6 @@ zink_fb_clears_apply_region(struct zink_context *ctx, struct pipe_resource *pres
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) {
if (ctx->fb_state.cbufs[i] && ctx->fb_state.cbufs[i]->texture == pres) {
fb_clears_apply_or_discard_internal(ctx, pres, region, false, true, i);
- return;
}
}
} else {
More information about the mesa-commit
mailing list