Fix off-by-one error in gpu allocator;

Refcount wasn't being initialized to 1.
This commit is contained in:
bjorn 2022-10-18 22:28:00 -07:00
parent 9b6e884f7f
commit 0b6fe9c81a
1 changed files with 1 additions and 0 deletions

View File

@ -2523,6 +2523,7 @@ static gpu_memory* gpu_allocate(gpu_memory_type type, VkMemoryRequirements info,
allocator->block = memory;
allocator->cursor = info.size;
allocator->block->refs = 1;
*offset = 0;
return memory;
}