mesa/src/imagination
Icenowy Zheng 771d342a1d pvr: follow other drivers' practice for copying build ID
Previously the output length of pvr_get_driver_build_sha() is changed to
BUILD_ID_EXPECTED_HASH_LENGTH, but the array defined to receive its
output, the driver_build_sha array inside struct pvr_instance, is
declared with BLAKE3_KEY_LEN, which is longer than
BUILD_ID_EXPECTED_HASH_LENGTH.

This leads to uninitialized memory being accessed when creating
pipelineCacheUUID value, and the pipelineCacheUUID value would become
random in each run, defecting the purpose of it.

Refactor the code copying the build ID to follow other drivers: changing
the parameter from the buffer to the instance pointer, inserting a
static assert thanks to being able to retrieve the destination buffer
length (as an array inside the instance structure) and using
copy_build_id_to_sha1() to do the final copy.

Fixes: 6a42493c94 ("pvr: Use BUILD_ID_EXPECTED_HASH_LENGTH")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Ella Stanforth <ella@igalia.com>
(cherry picked from commit 9870c8d8c4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41104>
2026-04-22 14:34:49 +02:00
..
ci pvr: finalize query_indices array after ending last sub_cmd 2026-04-15 11:03:05 +00:00
common pvr: re-enable wideLines 2026-04-14 15:30:57 +01:00
csbgen pvr: add basic volcanic hw-definitions 2026-02-13 09:28:56 +00:00
drm-shim pvr/drm-shim: avoid trying a random bvnc by default 2026-02-09 09:23:42 +00:00
include pco: Use vertex input registers in register allocation 2026-02-24 16:27:45 +00:00
pco pco: add native u{add,sub}{carry,borrow,sat} ops 2026-04-10 09:38:25 +00:00
vulkan pvr: follow other drivers' practice for copying build ID 2026-04-22 14:34:49 +02:00
.clang-format pco: Use vertex input registers in register allocation 2026-02-24 16:27:45 +00:00
.dir-locals.el
.editorconfig pvr: Change indentation from tab to spaces for xml files. 2022-08-31 08:26:17 +00:00
meson.build pvr: add support for drm-shim 2026-02-02 14:25:18 +00:00