From 6feec2d40e0acef6b2b1950fd960a9bfc84258b2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 14 Jun 2020 01:45:54 -0400 Subject: [PATCH] zink: clamp min created fb size to 1x1 this is required by spec Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 3a464f4c969..70845bb4385 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -492,8 +492,8 @@ create_framebuffer(struct zink_context *ctx) state.attachments[state.num_attachments++] = zink_surface(psurf); } - state.width = ctx->fb_state.width; - state.height = ctx->fb_state.height; + state.width = MAX2(ctx->fb_state.width, 1); + state.height = MAX2(ctx->fb_state.height, 1); state.layers = MAX2(util_framebuffer_get_num_layers(&ctx->fb_state), 1); state.samples = ctx->fb_state.samples;