Commit 44f26482 by Jamie Madill Committed by Commit Bot

Framebuffer: Fix getDepthStencilAttachment check.

The check should be using the newer operator== to check if attachments are the same - the id() method will hit an UNREACHABLE if it's called on a Surface attachment. I noticed this when using this method in the Vulkan RenderPass implementation. BUG=angleproject:1583 Change-Id: I387b35805893d04003b22a1c7c9c12fc41c726ce Reviewed-on: https://chromium-review.googlesource.com/412801Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 861ebb3b
......@@ -151,8 +151,7 @@ const FramebufferAttachment *FramebufferState::getDepthStencilAttachment() const
// A valid depth-stencil attachment has the same resource bound to both the
// depth and stencil attachment points.
if (mDepthAttachment.isAttached() && mStencilAttachment.isAttached() &&
mDepthAttachment.type() == mStencilAttachment.type() &&
mDepthAttachment.id() == mStencilAttachment.id())
mDepthAttachment == mStencilAttachment)
{
return &mDepthAttachment;
}
......
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