zink: disable render_condition_enable during blit
We don't support stencil-exports yet, and even when we will, we might
not support it on all hardware. So we really need an alternative plan
here, even when render_condition_enable is true.
Fixing this properly is much more involved, and depends on reworking
render-condition along the lines that we do in !7746 to support pausing
and resuming properly first. So let's do the minimal thing, which is to
allow this to work in cases where no render-condition is active.
Fixes: 767f70dfe1
("gallium/util: fix util_can_blit_via_copy_region for conditional rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4056
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8379>
This commit is contained in:
parent
7ef2046065
commit
317ec8b501
|
@ -184,8 +184,17 @@ zink_blit(struct pipe_context *pctx,
|
|||
struct zink_resource *src = zink_resource(info->src.resource);
|
||||
struct zink_resource *dst = zink_resource(info->dst.resource);
|
||||
/* if we're copying between resources with matching aspects then we can probably just copy_region */
|
||||
if (src->aspect == dst->aspect && util_try_blit_via_copy_region(pctx, info))
|
||||
return;
|
||||
if (src->aspect == dst->aspect) {
|
||||
struct pipe_blit_info new_info = *info;
|
||||
|
||||
if (src->aspect & VK_IMAGE_ASPECT_STENCIL_BIT &&
|
||||
new_info.render_condition_enable &&
|
||||
!ctx->render_condition_active)
|
||||
new_info.render_condition_enable = false;
|
||||
|
||||
if (util_try_blit_via_copy_region(pctx, &new_info))
|
||||
return;
|
||||
}
|
||||
|
||||
if (!util_blitter_is_blit_supported(ctx->blitter, info)) {
|
||||
debug_printf("blit unsupported %s -> %s\n",
|
||||
|
|
Loading…
Reference in New Issue