panvk: correct number of read bytes for dynamic buffers

This function takes the number of bytes, not number of entries. This
should hopefully fix start-up issues on Citra.

While we're at it, fixup the alignment of the line that writes the
bytes.

Fixes: 27beadcbdb ("panvk: Extend the shader logic to support Valhall")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12539
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33429>
This commit is contained in:
Erik Faye-Lund
2025-02-06 15:27:12 +01:00
committed by Marge Bot
parent c3d27906d8
commit 2ae97a4eb6
+2 -1
View File
@@ -1191,6 +1191,7 @@ shader_desc_info_deserialize(struct blob_reader *blob,
#else
shader->desc_info.dyn_bufs.count = blob_read_uint32(blob);
blob_copy_bytes(blob, shader->desc_info.dyn_bufs.map,
sizeof(*shader->desc_info.dyn_bufs.map) *
shader->desc_info.dyn_bufs.count);
#endif
@@ -1291,7 +1292,7 @@ shader_desc_info_serialize(struct blob *blob, const struct panvk_shader *shader)
blob_write_uint32(blob, shader->desc_info.dyn_bufs.count);
blob_write_bytes(blob, shader->desc_info.dyn_bufs.map,
sizeof(*shader->desc_info.dyn_bufs.map) *
shader->desc_info.dyn_bufs.count);
shader->desc_info.dyn_bufs.count);
#endif
}