Vulkan validation error cleanups

This commit is contained in:
Henrik Rydgård committed 2024-07-28 08:08:48 -06:00
1 parent 0a1cd19afe
commit 144b3a8a98
2 files changed
+10 -6

No files matched your search

+4 -4
View File
@@ -901,10 +901,6 @@ void VulkanRenderManager::EndCurRenderStep() {
void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRRenderPassLoadAction color, VKRRenderPassLoadAction depth, VKRRenderPassLoadAction stencil, uint32_t clearColor, float clearDepth, uint8_t clearStencil, const char *tag) {
_dbg_assert_(insideFrame_);
#ifdef _DEBUG
SanityCheckPassesOnAdd();
#endif
// Eliminate dupes (bind of the framebuffer we already are rendering to), instantly convert to a clear if possible.
if (!steps_.empty() && steps_.back()->stepType == VKRStepType::RENDER && steps_.back()->render.framebuffer == fb) {
u32 clearMask = 0;
@@ -949,6 +945,10 @@ void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRR
}
}
#ifdef _DEBUG
SanityCheckPassesOnAdd();
#endif
// More redundant bind elimination.
if (curRenderStep_) {
if (curRenderStep_->commands.empty()) {