Fix descriptor buffer size discrapency

This commit is contained in:
Georg Hagen
2024-06-04 11:30:16 +02:00
parent d1f1d208b1
commit dc503acb73

View File

@@ -314,7 +314,7 @@ namespace OpenVulkano::Vulkan
uint32_t offset = Utils::Align(allocation->used, memoryRequirements.alignment); uint32_t offset = Utils::Align(allocation->used, memoryRequirements.alignment);
device.bindBufferMemory(buffer, allocation->memory, offset); device.bindBufferMemory(buffer, allocation->memory, offset);
allocation->used += memoryRequirements.size + (offset - allocation->used); allocation->used += memoryRequirements.size + (offset - allocation->used);
return new ManagedBuffer{ allocation, offset, size, buffer, usage, properties, nullptr }; return new ManagedBuffer{ allocation, offset, memoryRequirements.size, buffer, usage, properties, nullptr };
} }
MemoryAllocation* ResourceManager::CreateMemoryAllocation(size_t size, uint32_t type, bool addToCache) MemoryAllocation* ResourceManager::CreateMemoryAllocation(size_t size, uint32_t type, bool addToCache)