zink: don't fixup depth buffer if it's already big enough

the zs buffer doesn't have to exactly match the size of the framebuffer,
it just has to be "big enough"

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
This commit is contained in:
Mike Blumenkrantz 2025-05-28 13:12:18 -04:00 committed by Marge Bot
parent 3dc8d81332
commit 1d1ca611be

View file

@ -1122,7 +1122,7 @@ zink_kopper_fixup_depth_buffer(struct zink_context *ctx)
struct zink_ctx_surface *csurf = (struct zink_ctx_surface*)ctx->fb_zsbuf;
unsigned width = pipe_surface_width(&ctx->fb_state.zsbuf);
unsigned height = pipe_surface_height(&ctx->fb_state.zsbuf);
if (width == ctx->fb_state.width && height == ctx->fb_state.height)
if (width >= ctx->fb_state.width && height >= ctx->fb_state.height)
return;
struct pipe_resource templ = *ctx->fb_state.zsbuf.texture;