gpu: fix allocator;

This commit is contained in:
bjorn 2022-07-11 19:53:53 -07:00
parent a4e4181489
commit ae87abc7bb
1 changed files with 2 additions and 2 deletions

View File

@ -412,7 +412,7 @@ void* gpu_map(gpu_buffer* buffer, uint32_t size, uint32_t align, gpu_map_mode mo
if (oversized) {
bufferSize = size;
} else {
while (pool->size < size) {
while (pool->size < cursor + size) {
pool->size = pool->size ? (pool->size << 1) : (1 << 22);
}
bufferSize = pool->size * COUNTOF(state.ticks);
@ -2381,7 +2381,7 @@ static gpu_memory* gpu_allocate(gpu_memory_type type, VkMemoryRequirements info,
}
}
check(false, "Out of space for memory blocks");
check(false, "Out of GPU memory");
return NULL;
}