diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2023-06-29 11:54:55 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-01-05 21:54:35 +0000 |
commit | d6c258d9eedccddc95347442dd06df58dbbf3d20 (patch) | |
tree | 607463071a712fa23bdf3a93fb66445545b01f0d /src/vulkan/overlay-layer | |
parent | aa8ea0f1b9d737905329c2bbe7ba0952d4e872b5 (diff) |
util: Add align_uintptr and use it treewide to replace ALIGN that works on size_t and uintptr_t
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26866>
Diffstat (limited to 'src/vulkan/overlay-layer')
-rw-r--r-- | src/vulkan/overlay-layer/overlay.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp index 1064aefebf5..43179d5b789 100644 --- a/src/vulkan/overlay-layer/overlay.cpp +++ b/src/vulkan/overlay-layer/overlay.cpp @@ -1225,8 +1225,8 @@ static struct overlay_draw *render_swapchain_display(struct swapchain_data *data VK_SUBPASS_CONTENTS_INLINE); /* Create/Resize vertex & index buffers */ - size_t vertex_size = ALIGN(draw_data->TotalVtxCount * sizeof(ImDrawVert), device_data->properties.limits.nonCoherentAtomSize); - size_t index_size = ALIGN(draw_data->TotalIdxCount * sizeof(ImDrawIdx), device_data->properties.limits.nonCoherentAtomSize); + size_t vertex_size = align_uintptr(draw_data->TotalVtxCount * sizeof(ImDrawVert), device_data->properties.limits.nonCoherentAtomSize); + size_t index_size = align_uintptr(draw_data->TotalIdxCount * sizeof(ImDrawIdx), device_data->properties.limits.nonCoherentAtomSize); if (draw->vertex_buffer_size < vertex_size) { CreateOrResizeBuffer(device_data, &draw->vertex_buffer, |