pvr: Fix packing issue with max_{x,y}_clip
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Wed, 19 Jul 2023 12:13:09 +0000 (13:13 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Jul 2023 11:03:41 +0000 (11:03 +0000)
commit2c6cadb5ea93d67050c2044e84d161280d4d5f11
tree7683e96c367fcf0fdde18505aefc55e6756498b7
parent670bd70fa6c1e53b13755a8868ee8cf7708a56f5
pvr: Fix packing issue with max_{x,y}_clip

The spec. guarantees the framebuffer width and height to be `> 0`
but the same is not true for the render area.

Previously a render area of `0` size would wrap around due to the
`- 1` so we now check for `0`.

Fixes:
  pvr_packet_helpers.h:79: __pvr_uint: Assertion `v <= max' failed.
on
  dEQP-VK.api.pipeline.renderpass.framebuffer_compatible_renderpass

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24329>
src/imagination/vulkan/pvr_cmd_buffer.c