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/412801
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index 4bb2138..be0d601 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -151,8 +151,7 @@
// 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;
}