mesa/src/imagination
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
..
common pvr: Implement vkCreateSampler and vkDestroySampler APIs. 2022-03-25 12:12:08 +00:00
csbgen
include pvr: do not use fallthrough for unreachable code 2022-03-24 11:25:45 +00:00
rogue pvr: Gate offline compiler build behind -Dtools=imagination 2022-03-24 11:39:39 +00:00
vulkan pvr: Add stricter type checking in pvr_csb_pack(). 2022-04-04 03:40:48 +00:00
.clang-format
.dir-locals.el
.editorconfig
meson.build