mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
anv/descriptor_set: Properly align descriptor buffer to a page
Instead of aligning and then taking inline uniforms into account, we
need to take inline uniforms into account and then align to a page.
Otherwise, we may not be aligned to a page and allocation may fail.
Fixes: 43f40dc7cb "anv: Implement VK_EXT_inline_uniform_block"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
3d33c13eca
commit
45957c05b0
1 changed files with 1 additions and 1 deletions
|
|
@ -676,10 +676,10 @@ VkResult anv_CreateDescriptorPool(
|
|||
* of them to 32B.
|
||||
*/
|
||||
descriptor_bo_size += 32 * pCreateInfo->maxSets;
|
||||
descriptor_bo_size = ALIGN(descriptor_bo_size, 4096);
|
||||
/* We align inline uniform blocks to 32B */
|
||||
if (inline_info)
|
||||
descriptor_bo_size += 32 * inline_info->maxInlineUniformBlockBindings;
|
||||
descriptor_bo_size = ALIGN(descriptor_bo_size, 4096);
|
||||
|
||||
const size_t pool_size =
|
||||
pCreateInfo->maxSets * sizeof(struct anv_descriptor_set) +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue