aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink/zink_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/zink/zink_context.c')
-rw-r--r--src/gallium/drivers/zink/zink_context.c4
1 files changed, 4 insertions, 0 deletions
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;
}