mesa/src/imagination/vulkan
Karmjit Mahil e5439bf4aa pvr: Add stricter type checking in pvr_csb_pack().
Since the packing functions generated by csbgen use a void pointer
for the buffer in which to pack, it's possible to easily write out
of bounds. This commits attempts to reduce the chances by
having the pack macro check that the pointer passed points to an
element sized equally to the state word being packed. Catching
these errors earlier.

As can be seen in this commit, there already was a case of this:
"pds_ctrl". The word size is meant to be 64 bits but the pointer
was pointing to a 32 bit field.

Although it's fine for the word size to be smaller than the
storage pointed to by the pointer, this is not allowed just to
be extra careful.

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/15687>
2022-04-04 03:40:48 +00:00
..
pds pvr: fix clang unused function warning 2022-03-31 17:05:44 +00:00
usc/programs
winsys pvr: Add stricter type checking in pvr_csb_pack(). 2022-04-04 03:40:48 +00:00
meson.build
pvr_blit.c
pvr_bo.c
pvr_bo.h
pvr_cmd_buffer.c pvr: do not use fallthrough for unreachable code 2022-03-24 11:25:45 +00:00
pvr_csb.c
pvr_csb.h pvr: Add stricter type checking in pvr_csb_pack(). 2022-04-04 03:40:48 +00:00
pvr_descriptor_set.c pvr: Fix seg fault in vkAllocateDescriptorSets(). 2022-03-31 17:12:21 +00:00
pvr_device.c pvr: Check if the buffer/image was bound before unbinding. 2022-03-30 14:26:07 +00:00
pvr_formats.c
pvr_formats.h
pvr_hw_pass.c
pvr_hw_pass.h
pvr_image.c pvr: Check if the buffer/image was bound before unbinding. 2022-03-30 14:26:07 +00:00
pvr_job_common.c vulkan: Move common format function to vulkan/util/vk_format.h 2022-03-31 17:18:22 +00:00
pvr_job_common.h
pvr_job_compute.c
pvr_job_compute.h
pvr_job_context.c pvr: Add stricter type checking in pvr_csb_pack(). 2022-04-04 03:40:48 +00:00
pvr_job_context.h
pvr_job_render.c pvr: use zloadformat instead of zstoreformat 2022-03-23 14:17:34 +01:00
pvr_job_render.h
pvr_limits.h
pvr_pass.c pvr: fixup typos when allocating object 2022-03-23 14:17:34 +01:00
pvr_pipeline.c
pvr_pipeline_cache.c
pvr_private.h pvr: Fix seg fault in vkAllocateDescriptorSets(). 2022-03-31 17:12:21 +00:00
pvr_query.c
pvr_queue.c pvr: Remove duplicate variable queue_create. 2022-03-29 08:56:27 +00:00
pvr_shader.c
pvr_shader.h
pvr_tex_state.c
pvr_tex_state.h
pvr_wsi.c
vk_format.h vulkan: Move common format function to vulkan/util/vk_format.h 2022-03-31 17:18:22 +00:00