mesa/src/panfrost/genxml
Boris Brezillon 737fc5d3c1 pan/genxml: Make sure we catch overflows on 32-bit integer fields
If we store the temporary value in a [u]int32_t, the result might be
silently truncated, making the overflow check in the u_pack helpers
useless.

Make sure we use 64-bit fields as soon as the size is greater than 31
bits to prevent that.

It forces us to fix some types in the xml and helper arguments (sint
wrongly defined as uint) and add explicit casts on u32 subtraction
whose result is stored in an s32.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
..
test panvk: Add tests for ls tracking in cs_maybe 2025-06-13 08:28:30 +00:00
common.xml pan/lib: Add support for rotated 2x grid sample pattern 2025-05-19 10:13:49 +00:00
cs_builder.h pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
decode.c panfrost, panvk: Use arch version 9 to distinguish between Bifrost & Valhall 2025-06-18 16:09:03 +00:00
decode.h
decode_common.c
decode_csf.c pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
decode_jm.c panfrost, panvk: Use arch version 9 to distinguish between Bifrost & Valhall 2025-06-18 16:09:03 +00:00
gen_macros.h
gen_pack.py pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
meson.build pan/csf: add cs_builder unit test infrastructure 2025-05-26 04:15:21 +00:00
pan_pack_helpers.h pan/genxml: Switch pan_merge to a macro 2025-06-06 12:58:21 +00:00
v4.xml pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
v5.xml pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
v6.xml pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
v7.xml pan/genxml: Make sure we catch overflows on 32-bit integer fields 2025-06-25 12:10:37 +02:00
v9.xml panfrost, panvk: The size of resource tables needs to be a multiple of 4. 2025-06-18 16:09:03 +00:00
v10.xml panfrost, panvk: The size of resource tables needs to be a multiple of 4. 2025-06-18 16:09:03 +00:00
v12.xml panfrost, panvk: The size of resource tables needs to be a multiple of 4. 2025-06-18 16:09:03 +00:00
v13.xml panfrost, panvk: The size of resource tables needs to be a multiple of 4. 2025-06-18 16:09:03 +00:00