pvr: fix invalid read reported by valgrind
authorFrank Binns <frank.binns@imgtec.com>
Mon, 22 May 2023 12:10:45 +0000 (13:10 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 25 May 2023 01:51:36 +0000 (01:51 +0000)
commit9b7faa7d960dcad4585dda4a946d58269875c5a8
tree4c85813888aa2ffd6b5bdad6652fc8972a29aeab
parenta7beb9974e97ccebbb5309b4ff7caa584531b392
pvr: fix invalid read reported by valgrind

pvr_gpu_upload() can't be used in the case of pvr_gpu_upload_usc() as it expects
the source and destination buffers to be the same size. This isn't the case
because pvr_gpu_upload_usc() adds some padding bytes to the size passed in by
the caller.

Fixes: 547a10f8702 ("pvr: switch pvr_cmd_buffer_alloc_mem to use pvr_bo_suballoc")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23185>
src/imagination/vulkan/pvr_device.c