panvk: Fix viewport calculation

This fix
"dEQP-VK.dynamic_state.*.general_state.{bind_order, state_persistence, state_switch}"

Fixes: 1f57aae4e4 ("panvk: Move vkCmdDraw* functions to their own file")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30754>
This commit is contained in:
Mary Guillemard
2024-08-21 12:11:38 +02:00
committed by Marge Bot
parent 5b129e6eb9
commit a869237d50

View File

@@ -760,7 +760,7 @@ panvk_emit_viewport(const struct vk_viewport_state *vp, void *vpd)
int maxy = MAX2((int)viewport->y, (int)(viewport->y + viewport->height));
assert(scissor->offset.x >= 0 && scissor->offset.y >= 0);
miny = MAX2(scissor->offset.x, minx);
minx = MAX2(scissor->offset.x, minx);
miny = MAX2(scissor->offset.y, miny);
maxx = MIN2(scissor->offset.x + scissor->extent.width, maxx);
maxy = MIN2(scissor->offset.y + scissor->extent.height, maxy);