nvk: Use the page-aligned BO size for the descriptor pool
The BO may have more space in it than requested since it's aligned to 64K. We may as well make that available to the client. Reviewed-by: M Henning <drawoc@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28482>
This commit is contained in:
committed by
Marge Bot
parent
a2d3cdd5f2
commit
6cbd3a18d4
@@ -476,6 +476,12 @@ nvk_CreateDescriptorPool(VkDevice _device,
|
||||
nvk_destroy_descriptor_pool(dev, pAllocator, pool);
|
||||
return vk_error(dev, VK_ERROR_OUT_OF_DEVICE_MEMORY);
|
||||
}
|
||||
|
||||
/* The BO may be larger thanks to GPU page alignment. We may as well
|
||||
* make that extra space available to the client.
|
||||
*/
|
||||
assert(pool->bo->size >= bo_size);
|
||||
bo_size = pool->bo->size;
|
||||
}
|
||||
|
||||
pool->size = bo_size;
|
||||
|
||||
Reference in New Issue
Block a user