Mesa (main): zink: don't break early when applying fb clears
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 26 15:06:07 UTC 2021
Module: Mesa
Branch: main
Commit: dabe477b4f273964afedab2fce2be22f2617268f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dabe477b4f273964afedab2fce2be22f2617268f
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>
---
src/gallium/drivers/zink/zink_clear.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_clear.c b/src/gallium/drivers/zink/zink_clear.c
index b99449512e7..77f294f5279 100644
--- a/src/gallium/drivers/zink/zink_clear.c
+++ b/src/gallium/drivers/zink/zink_clear.c
@@ -604,7 +604,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 {
@@ -622,7 +621,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;
}
}
}
@@ -696,7 +694,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 {
@@ -713,7 +710,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