mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 03:38:06 +02:00
zink: Only set the needed number of scissors.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9968>
This commit is contained in:
parent
bde2291531
commit
6dc07a173e
1 changed files with 4 additions and 2 deletions
|
|
@ -430,7 +430,7 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
screen->vk_CmdSetViewportWithCountEXT(batch->state->cmdbuf, ctx->vp_state.num_viewports, viewports);
|
||||
else
|
||||
vkCmdSetViewport(batch->state->cmdbuf, 0, ctx->vp_state.num_viewports, viewports);
|
||||
VkRect2D scissors[PIPE_MAX_VIEWPORTS] = {};
|
||||
VkRect2D scissors[PIPE_MAX_VIEWPORTS];
|
||||
if (ctx->rast_state->base.scissor) {
|
||||
for (unsigned i = 0; i < ctx->vp_state.num_viewports; i++) {
|
||||
scissors[i].offset.x = ctx->vp_state.scissor_states[i].minx;
|
||||
|
|
@ -438,8 +438,10 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
scissors[i].extent.width = ctx->vp_state.scissor_states[i].maxx - ctx->vp_state.scissor_states[i].minx;
|
||||
scissors[i].extent.height = ctx->vp_state.scissor_states[i].maxy - ctx->vp_state.scissor_states[i].miny;
|
||||
}
|
||||
} else if (ctx->fb_state.width && ctx->fb_state.height) {
|
||||
} else {
|
||||
for (unsigned i = 0; i < ctx->vp_state.num_viewports; i++) {
|
||||
scissors[i].offset.x = 0;
|
||||
scissors[i].offset.y = 0;
|
||||
scissors[i].extent.width = ctx->fb_state.width;
|
||||
scissors[i].extent.height = ctx->fb_state.height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue