From ca074edc7f462d09ea35437979c7d241675d12ed Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 21 Jun 2019 15:37:42 +0200 Subject: zink: clamp scissors Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_context.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3