mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
radv: add padding to radv_shader_binary_legacy
This fixes an alignment mismatch in radv_shader_serialize() Fixes:577d76f60f('radv: add radv_shader_serialize() and radv_shader_deserialize() functions') Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22735> (cherry picked from commit7fc259e4e7)
This commit is contained in:
parent
6ad6513226
commit
4e2e63ee00
2 changed files with 5 additions and 1 deletions
|
|
@ -346,7 +346,7 @@
|
|||
"description": "radv: add padding to radv_shader_binary_legacy",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "577d76f60f788c3a8d43b4b388bb5a04e4e64994"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -450,11 +450,15 @@ struct radv_shader_binary_legacy {
|
|||
uint32_t ir_size;
|
||||
uint32_t disasm_size;
|
||||
uint32_t stats_size;
|
||||
uint32_t padding;
|
||||
|
||||
/* data has size of stats_size + code_size + ir_size + disasm_size + 2,
|
||||
* where the +2 is for 0 of the ir strings. */
|
||||
uint8_t data[0];
|
||||
};
|
||||
static_assert(sizeof(struct radv_shader_binary_legacy) ==
|
||||
offsetof(struct radv_shader_binary_legacy, data),
|
||||
"Unexpected padding");
|
||||
|
||||
struct radv_shader_binary_rtld {
|
||||
struct radv_shader_binary base;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue