mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
zink: use align64 for allocation sizes
avoid 32bit sint overflows fixes #5568 cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13560>
This commit is contained in:
parent
2e9e113b7f
commit
c4a513d978
1 changed files with 1 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ bo_create_internal(struct zink_screen *screen,
|
|||
mai.memoryTypeIndex = screen->heap_map[heap];
|
||||
if (screen->info.mem_props.memoryTypes[mai.memoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
|
||||
alignment = MAX2(alignment, screen->info.props.limits.minMemoryMapAlignment);
|
||||
mai.allocationSize = align(mai.allocationSize, screen->info.props.limits.minMemoryMapAlignment);
|
||||
mai.allocationSize = align64(mai.allocationSize, screen->info.props.limits.minMemoryMapAlignment);
|
||||
}
|
||||
VkResult ret = VKSCR(AllocateMemory)(screen->dev, &mai, NULL, &bo->mem);
|
||||
if (!zink_screen_handle_vkresult(screen, ret))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue