pvr: Fix possible allocation of 0 size
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Fri, 5 May 2023 13:06:02 +0000 (14:06 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 18 May 2023 10:05:26 +0000 (10:05 +0000)
commit792cf1caffd0ed87f714678b9aba913c829edb3f
treed8bad4cbd683b1b7c44b80058eb7b0b3658ce632
parent5f60444b132e745817fde0d0ffea71221dcd78a0
pvr: Fix possible allocation of 0 size

Some tests had `input_count == 0` so the driver would attempt to
`vk_alloc()` a size of zero and error out. Add some checks to
prevent that.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23070>
src/imagination/vulkan/pvr_hw_pass.c