mirror of https://github.com/bjornbytes/lovr.git
gpu: fix allocator;
This commit is contained in:
parent
a4e4181489
commit
ae87abc7bb
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue