Skip to content
Permalink
Browse files

Minor code cleanup

  • Loading branch information...
hrydgard committed Aug 12, 2019
1 parent f4d348c commit 49e64f10d47272ebabbf577c6def844dcb07c3e3
Showing with 5 additions and 3 deletions.
  1. +5 −3 ext/native/thin3d/VulkanRenderManager.cpp
@@ -800,7 +800,8 @@ void VulkanRenderManager::BlitFramebuffer(VKRFramebuffer *src, VkRect2D srcRect,
}

VkImageView VulkanRenderManager::BindFramebufferAsTexture(VKRFramebuffer *fb, int binding, int aspectBit, int attachment) {
// Should just mark the dependency and return the image.
// Mark the dependency and return the image.

for (int i = (int)steps_.size() - 1; i >= 0; i--) {
if (steps_[i]->stepType == VKRStepType::RENDER && steps_[i]->render.framebuffer == fb) {
// If this framebuffer was rendered to earlier in this frame, make sure to pre-transition it to the correct layout.
@@ -817,9 +818,10 @@ VkImageView VulkanRenderManager::BindFramebufferAsTexture(VKRFramebuffer *fb, in
curRenderStep_->preTransitions.back().targetLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
// We're done.
return fb->color.imageView;
} else {
curRenderStep_->preTransitions.push_back({ fb, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL });
return fb->color.imageView;
}
curRenderStep_->preTransitions.push_back({ fb, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL });
return fb->color.imageView;
}

void VulkanRenderManager::Finish() {

0 comments on commit 49e64f1

Please sign in to comment.
You can’t perform that action at this time.