diff options
author | Erik Faye-Lund <[email protected]> | 2019-06-21 15:37:42 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-28 08:51:45 +0000 |
commit | ca074edc7f462d09ea35437979c7d241675d12ed (patch) | |
tree | 3e9ea635fed62ce5a269eb02698852ed3c140899 /src/gallium/drivers | |
parent | 249cd3fc134a713986507b3ac7788880ba4946d9 (diff) |
zink: clamp scissors
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/zink/zink_context.c | 4 |
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; } |