Add buffer and texture managers for handling object lifetimes

This commit is contained in:
Magnus Norddahl 2022-06-10 01:22:19 +02:00 committed by Christoph Oelckers
commit 298c023b1d
17 changed files with 162 additions and 55 deletions

View file

@ -29,7 +29,7 @@ VkStreamBuffer::VkStreamBuffer(VulkanFrameBuffer* fb, size_t structSize, size_t
{
mBlockSize = static_cast<uint32_t>((structSize + screen->uniformblockalignment - 1) / screen->uniformblockalignment * screen->uniformblockalignment);
UniformBuffer = (VKDataBuffer*)fb->CreateDataBuffer(-1, false, false);
UniformBuffer = (VkHardwareDataBuffer*)fb->CreateDataBuffer(-1, false, false);
UniformBuffer->SetData(mBlockSize * count, nullptr, BufferUsageType::Persistent);
}