mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 02:39:05 +02:00
Vulkan: Avoid duplicate image pre-transitions (actually eliminated later anyway, but a small saving)
This commit is contained in:
1 parent
168d89284c
commit
b52285287d
1 file changed
+6
@@ -687,6 +687,12 @@ VkImageView VulkanRenderManager::BindFramebufferAsTexture(VKRFramebuffer *fb, in
|
||||
}
|
||||
}
|
||||
|
||||
if (!curRenderStep_->preTransitions.empty() &&
|
||||
curRenderStep_->preTransitions.back().fb == fb &&
|
||||
curRenderStep_->preTransitions.back().targetLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
|
||||
// We're done.
|
||||
return fb->color.imageView;
|
||||
}
|
||||
curRenderStep_->preTransitions.push_back({ fb, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL });
|
||||
return fb->color.imageView;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user