mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 19:20:08 +01:00
vulkan/multialloc: bump max number to 16
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27380>
This commit is contained in:
parent
4de62731f4
commit
d7f5a815e3
1 changed files with 6 additions and 2 deletions
|
|
@ -181,7 +181,7 @@ struct vk_multialloc {
|
|||
size_t align;
|
||||
|
||||
uint32_t ptr_count;
|
||||
void **ptrs[12];
|
||||
void **ptrs[16];
|
||||
};
|
||||
|
||||
#define VK_MULTIALLOC(_name) \
|
||||
|
|
@ -244,7 +244,7 @@ vk_multialloc_alloc(struct vk_multialloc *ma,
|
|||
* constant, GCC is incapable of figuring this out and unrolling the loop
|
||||
* so we have to give it a little help.
|
||||
*/
|
||||
STATIC_ASSERT(ARRAY_SIZE(ma->ptrs) == 12);
|
||||
STATIC_ASSERT(ARRAY_SIZE(ma->ptrs) == 16);
|
||||
#define _VK_MULTIALLOC_UPDATE_POINTER(_i) \
|
||||
if ((_i) < ma->ptr_count) \
|
||||
*ma->ptrs[_i] = (char *)ptr + (uintptr_t)*ma->ptrs[_i]
|
||||
|
|
@ -260,6 +260,10 @@ vk_multialloc_alloc(struct vk_multialloc *ma,
|
|||
_VK_MULTIALLOC_UPDATE_POINTER(9);
|
||||
_VK_MULTIALLOC_UPDATE_POINTER(10);
|
||||
_VK_MULTIALLOC_UPDATE_POINTER(11);
|
||||
_VK_MULTIALLOC_UPDATE_POINTER(12);
|
||||
_VK_MULTIALLOC_UPDATE_POINTER(13);
|
||||
_VK_MULTIALLOC_UPDATE_POINTER(14);
|
||||
_VK_MULTIALLOC_UPDATE_POINTER(15);
|
||||
#undef _VK_MULTIALLOC_UPDATE_POINTER
|
||||
|
||||
return ptr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue