mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
zink: fix stencil-only blitting with stencil fallback
these shouldn't do extra depth blits
fixes (nvidia):
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only,Fail
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_stencil_only,Fail
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_depth24_stencil8,Fail
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27859>
(cherry picked from commit f55ed175eb)
This commit is contained in:
parent
d2b3fb381b
commit
5f5cecd9e5
2 changed files with 14 additions and 7 deletions
|
|
@ -3784,7 +3784,7 @@
|
|||
"description": "zink: fix stencil-only blitting with stencil fallback",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -362,13 +362,20 @@ zink_blit(struct pipe_context *pctx,
|
|||
bool stencil_blit = false;
|
||||
if (!util_blitter_is_blit_supported(ctx->blitter, info)) {
|
||||
if (util_format_is_depth_or_stencil(info->src.resource->format)) {
|
||||
struct pipe_blit_info depth_blit = *info;
|
||||
depth_blit.mask = PIPE_MASK_Z;
|
||||
stencil_blit = util_blitter_is_blit_supported(ctx->blitter, &depth_blit);
|
||||
if (stencil_blit) {
|
||||
zink_blit_begin(ctx, ZINK_BLIT_SAVE_FB | ZINK_BLIT_SAVE_FS | ZINK_BLIT_SAVE_TEXTURES);
|
||||
util_blitter_blit(ctx->blitter, &depth_blit);
|
||||
if (info->mask & PIPE_MASK_Z) {
|
||||
struct pipe_blit_info depth_blit = *info;
|
||||
depth_blit.mask = PIPE_MASK_Z;
|
||||
if (util_blitter_is_blit_supported(ctx->blitter, &depth_blit)) {
|
||||
zink_blit_begin(ctx, ZINK_BLIT_SAVE_FB | ZINK_BLIT_SAVE_FS | ZINK_BLIT_SAVE_TEXTURES);
|
||||
util_blitter_blit(ctx->blitter, &depth_blit);
|
||||
} else {
|
||||
mesa_loge("ZINK: depth blit unsupported %s -> %s",
|
||||
util_format_short_name(info->src.resource->format),
|
||||
util_format_short_name(info->dst.resource->format));
|
||||
}
|
||||
}
|
||||
if (info->mask & PIPE_MASK_S)
|
||||
stencil_blit = true;
|
||||
}
|
||||
if (!stencil_blit) {
|
||||
mesa_loge("ZINK: blit unsupported %s -> %s",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue