zink: handle in-renderpass clears in fb_clears_apply_internal()
this isn't used yet, but it may as well be handled in case that changes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705>
This commit is contained in:
committed by
Marge Bot
parent
b715aaa5f1
commit
94aeb1041f
@@ -492,8 +492,9 @@ fb_clears_apply_internal(struct zink_context *ctx, struct pipe_resource *pres, i
|
||||
|
||||
if (!zink_fb_clear_enabled(ctx, i))
|
||||
return;
|
||||
if (zink_resource(pres)->aspect == VK_IMAGE_ASPECT_COLOR_BIT) {
|
||||
assert(!ctx->batch.in_rp);
|
||||
if (ctx->batch.in_rp)
|
||||
zink_clear_framebuffer(ctx, BITFIELD_BIT(i));
|
||||
else if (zink_resource(pres)->aspect == VK_IMAGE_ASPECT_COLOR_BIT) {
|
||||
if (zink_fb_clear_needs_explicit(fb_clear) || !check_3d_layers(ctx->fb_state.cbufs[i]))
|
||||
/* this will automatically trigger all the clears */
|
||||
zink_batch_rp(ctx);
|
||||
@@ -510,7 +511,6 @@ fb_clears_apply_internal(struct zink_context *ctx, struct pipe_resource *pres, i
|
||||
zink_fb_clear_reset(ctx, i);
|
||||
return;
|
||||
} else {
|
||||
assert(!ctx->batch.in_rp);
|
||||
if (zink_fb_clear_needs_explicit(fb_clear) || !check_3d_layers(ctx->fb_state.zsbuf))
|
||||
/* this will automatically trigger all the clears */
|
||||
zink_batch_rp(ctx);
|
||||
|
||||
Reference in New Issue
Block a user