v3d,v3dv: fix viewport offset for negative viewport center
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 6 Jun 2023 08:39:37 +0000 (10:39 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 7 Jun 2023 18:40:56 +0000 (18:40 +0000)
commitc5b6a65f81445553c023f7e3f253c8afebf27dd0
treedba81a1d28764d2793049124077f8f2fc7a9878b
parent78dc0bc58910fe5bae7d8a573e9ee64a0026f685
v3d,v3dv: fix viewport offset for negative viewport center

If the viewport center is not positive we can't express it
through the fine coordinates, which are unsigned, and we
need to use the coarse coordinates too.

Fixes new crashes in Vulkan CTS 1.3.6.0:
dEQP-VK.draw.renderpass.offscreen_viewport.*negative*

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
src/broadcom/vulkan/v3dvx_cmd_buffer.c
src/gallium/drivers/v3d/v3dx_emit.c