Permalink
Browse files

VKRFramebufer: Just some checks to be slightly safer in case creation…

… failed..
  • Loading branch information...
hrydgard committed Nov 30, 2017
1 parent 0d60c3f commit b4bca7d7a0738df44f8675e2b26c4bd57cdd92cd
Showing with 14 additions and 7 deletions.
  1. +14 −7 ext/native/thin3d/VulkanRenderManager.h
@@ -51,13 +51,20 @@ class VKRFramebuffer {
}
~VKRFramebuffer() {
vulkan_->Delete().QueueDeleteImage(color.image);
vulkan_->Delete().QueueDeleteImage(depth.image);
vulkan_->Delete().QueueDeleteImageView(color.imageView);
vulkan_->Delete().QueueDeleteImageView(depth.imageView);
vulkan_->Delete().QueueDeleteDeviceMemory(color.memory);
vulkan_->Delete().QueueDeleteDeviceMemory(depth.memory);
vulkan_->Delete().QueueDeleteFramebuffer(framebuf);
if (color.image)
vulkan_->Delete().QueueDeleteImage(color.image);
if (depth.image)
vulkan_->Delete().QueueDeleteImage(depth.image);
if (color.imageView)
vulkan_->Delete().QueueDeleteImageView(color.imageView);
if (depth.imageView)
vulkan_->Delete().QueueDeleteImageView(depth.imageView);
if (color.memory)
vulkan_->Delete().QueueDeleteDeviceMemory(color.memory);
if (depth.memory)
vulkan_->Delete().QueueDeleteDeviceMemory(depth.memory);
if (framebuf)
vulkan_->Delete().QueueDeleteFramebuffer(framebuf);
}
int numShadows = 1; // TODO: Support this.

0 comments on commit b4bca7d

Please sign in to comment.