mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 19:10:14 +01:00
anv: Align anv_descriptor_pool::host_mem
Otherwise anv_descriptor_set is accessed through an unaligned pointer,
which is undefined behavior in C.
```
anv_descriptor_set.c:1620:17: runtime error: member access within misaligned address 0x61900002c2b5
for type 'struct anv_descriptor_set', which requires 8 byte alignment 0x61900002c2b5
```
Fixes: 2570a58bcd ("anv: Implement descriptor pools")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32070>
This commit is contained in:
parent
ece1ab3b87
commit
a2c4a34303
1 changed files with 1 additions and 1 deletions
|
|
@ -3035,7 +3035,7 @@ struct anv_descriptor_pool {
|
|||
*/
|
||||
bool host_only;
|
||||
|
||||
char host_mem[0];
|
||||
alignas(8) char host_mem[0];
|
||||
};
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue