panvk/shader: Use the right copy size for deserializing dynamic UBOs/SSBOs

Fixes: 563823c9ca ("panvk: Implement vk_shader")
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
This commit is contained in:
Faith Ekstrand 2025-10-23 16:17:49 -04:00 committed by Marge Bot
parent a546484ed9
commit 64ad337036

View file

@ -1551,10 +1551,12 @@ shader_desc_info_deserialize(struct panvk_device *dev,
#if PAN_ARCH < 9
shader->desc_info.dyn_ubos.count = blob_read_uint32(blob);
blob_copy_bytes(blob, shader->desc_info.dyn_ubos.map,
shader->desc_info.dyn_ubos.count);
sizeof(*shader->desc_info.dyn_ubos.map) *
shader->desc_info.dyn_ubos.count);
shader->desc_info.dyn_ssbos.count = blob_read_uint32(blob);
blob_copy_bytes(blob, shader->desc_info.dyn_ssbos.map,
shader->desc_info.dyn_ssbos.count);
sizeof(*shader->desc_info.dyn_ssbos.map) *
shader->desc_info.dyn_ssbos.count);
uint32_t others_count = 0;
for (unsigned i = 0; i < ARRAY_SIZE(shader->desc_info.others.count); i++) {