Commit 3d86e89b by Shahbaz Youssefi Committed by Commit Bot

Vulkan: properly handle 0-width or 0-height framebuffers

The test for whether 0-width or 0-height is not given was doing width != 0 || height != 0 which mistakenly used || instead of &&. Bug: angleproject:2910 Change-Id: Iaa41edffcfe1f8553e8fbefb9bc3b12a7f33a5a6 Reviewed-on: https://chromium-review.googlesource.com/c/1316028Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 37297a4f
...@@ -62,7 +62,7 @@ angle::Result RenderbufferVk::setStorage(const gl::Context *context, ...@@ -62,7 +62,7 @@ angle::Result RenderbufferVk::setStorage(const gl::Context *context,
} }
} }
if (!mImage.valid() && (width != 0 || height != 0)) if (!mImage.valid() && (width != 0 && height != 0))
{ {
const angle::Format &textureFormat = vkFormat.textureFormat(); const angle::Format &textureFormat = vkFormat.textureFormat();
bool isDepthOrStencilFormat = textureFormat.depthBits > 0 || textureFormat.stencilBits > 0; bool isDepthOrStencilFormat = textureFormat.depthBits > 0 || textureFormat.stencilBits > 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment