kk: Fix shader uint32_t value serialization

We need to write with blob_write_uint32 if we are using blob_read_uint32

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 15c0dd39fc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
This commit is contained in:
Aitor Camacho 2026-01-22 19:10:01 +09:00 committed by Eric Engestrom
parent a3f872630b
commit 9a63c20469
2 changed files with 3 additions and 3 deletions

View file

@ -15994,7 +15994,7 @@
"description": "kk: Fix shader uint32_t value serialization",
"nominated": false,
"nomination_type": 0,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1120,9 +1120,9 @@ kk_shader_serialize(struct vk_device *vk_dev, const struct vk_shader *vk_shader,
blob_write_bytes(blob, &shader->info, sizeof(shader->info));
uint32_t entrypoint_length = strlen(shader->entrypoint_name) + 1;
blob_write_bytes(blob, &entrypoint_length, sizeof(entrypoint_length));
uint32_t code_length = strlen(shader->msl_code) + 1;
blob_write_bytes(blob, &code_length, sizeof(code_length));
blob_write_uint32(blob, entrypoint_length);
blob_write_uint32(blob, code_length);
blob_write_bytes(blob, shader->entrypoint_name, entrypoint_length);
blob_write_bytes(blob, shader->msl_code, code_length);
blob_write_bytes(blob, &shader->pipeline, sizeof(shader->pipeline));