Then chaining still kinda broken

This commit is contained in:
Dynamitos
2021-12-22 14:32:40 +01:00
parent 8ccaa26223
commit 79ced0a30f
14 changed files with 131 additions and 53 deletions
@@ -233,7 +233,7 @@ PSubAllocation Allocator::allocate(const VkMemoryRequirements2 &memRequirements2
PAllocation newAllocation = new Allocation(graphics, this, requirements.size, memoryTypeIndex, properties, dedicatedInfo);
heaps[heapIndex].allocations.add(newAllocation);
return newAllocation->getSuballocation(requirements.size, requirements.alignment);
}
}
}
for (auto alloc : heaps[heapIndex].allocations)
{
@@ -74,6 +74,7 @@ void CmdBuffer::beginRenderPass(PRenderPass newRenderPass, PFramebuffer newFrame
beginInfo.framebuffer = framebuffer->getHandle();
vkCmdBeginRenderPass(handle, &beginInfo, renderPass->getSubpassContents());
state = State::RenderPassActive;
std::cout << "Beginning renderPass" << std::endl;
}
void CmdBuffer::endRenderPass()
@@ -81,6 +82,7 @@ void CmdBuffer::endRenderPass()
std::unique_lock lock(handleLock);
vkCmdEndRenderPass(handle);
state = State::InsideBegin;
std::cout << "Ending renderPass" << std::endl;
}
void CmdBuffer::executeCommands(const Array<Gfx::PRenderCommand>& commands)
@@ -88,7 +90,6 @@ void CmdBuffer::executeCommands(const Array<Gfx::PRenderCommand>& commands)
assert(state == State::RenderPassActive);
if(commands.size() == 0)
{
std::cout << "No commands!" << std::endl;
return;
}
std::unique_lock lock(handleLock);