vulkan/anv: align descriptor buffers to 4KB
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33903
This commit is contained in:
parent
3fa3b020c3
commit
4bba7b7c5d
3 changed files with 32 additions and 19 deletions
|
|
@ -73,7 +73,7 @@ impl VulkanBufferCache {
|
|||
align: DeviceSize,
|
||||
) -> Result<VulkanBuffer, VulkanError> {
|
||||
const MIN_ALLOCATION: DeviceSize = 1024;
|
||||
let capacity = capacity.max(MIN_ALLOCATION);
|
||||
let capacity = (capacity.max(MIN_ALLOCATION) + align - 1) & !(align - 1);
|
||||
let mut smallest = None;
|
||||
let mut smallest_size = DeviceSize::MAX;
|
||||
let mut fitting = None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue