Vulkan: Don't create zero-sized textures.
Make sure the old resources are deleted but do not create new resources.
BUG=angleproject:2161
Change-Id: Ia6685e5c67b160d9bcd503983aee9607b2bd402c
Reviewed-on: https://chromium-review.googlesource.com/891644
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RenderTargetVk.cpp b/src/libANGLE/renderer/vulkan/RenderTargetVk.cpp
index b559320..8098bff 100644
--- a/src/libANGLE/renderer/vulkan/RenderTargetVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RenderTargetVk.cpp
@@ -13,13 +13,18 @@
{
RenderTargetVk::RenderTargetVk()
- : format(nullptr),
- image(nullptr),
- imageView(nullptr),
- extents(),
- samples(VK_SAMPLE_COUNT_1_BIT),
- resource(nullptr)
{
+ reset();
+}
+
+void RenderTargetVk::reset()
+{
+ format = nullptr;
+ image = nullptr;
+ imageView = nullptr;
+ extents = gl::Extents();
+ samples = VK_SAMPLE_COUNT_1_BIT;
+ resource = nullptr;
}
} // namespace rx