From: Erik Faye-Lund Date: Fri, 21 Jun 2019 13:37:42 +0000 (+0200) Subject: zink: clamp scissors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca074edc7f462d09ea35437979c7d241675d12ed;p=mesa.git zink: clamp scissors Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 81a28288f3b..8ea635363ec 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -763,6 +763,10 @@ zink_clear(struct pipe_context *pctx, if (ctx->num_scissors) { for (unsigned i = 0 ; i < ctx->num_scissors; ++i) { rects[i].rect = ctx->scissors[i]; + rects[i].rect.extent.width = MIN2(rects[i].rect.extent.width, + fb->width); + rects[i].rect.extent.height = MIN2(rects[i].rect.extent.height, + fb->height); rects[i].baseArrayLayer = 0; rects[i].layerCount = num_layers; }