Commit c2520564 by Geoff Lang

Move unsupported depth stencil check to FramebufferD3D.

BUG=angleproject:885 Change-Id: I0abc674e365d2b5b65d23e2abf741a02a1146cdd Reviewed-on: https://chromium-review.googlesource.com/268311Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 440e5d4f
......@@ -488,13 +488,6 @@ GLenum Framebuffer::checkStatus(const gl::Data &data) const
}
}
// if we have both a depth and stencil buffer, they must refer to the same object
// since we only support packed_depth_stencil and not separate depth and stencil
if (depthAttachment.isAttached() && stencilAttachment.isAttached() && !hasValidDepthStencil())
{
return GL_FRAMEBUFFER_UNSUPPORTED;
}
// we need to have at least one attachment to be complete
if (missingAttachment)
{
......
......@@ -320,6 +320,14 @@ gl::Error FramebufferD3D::blit(const gl::State &state, const gl::Rectangle &sour
GLenum FramebufferD3D::checkStatus() const
{
// if we have both a depth and stencil buffer, they must refer to the same object
// since we only support packed_depth_stencil and not separate depth and stencil
if (mData.getDepthAttachment() != nullptr && mData.getStencilAttachment() != nullptr &&
mData.getDepthStencilAttachment() == nullptr)
{
return GL_FRAMEBUFFER_UNSUPPORTED;
}
// D3D11 does not allow for overlapping RenderTargetViews, so ensure uniqueness
const auto &colorAttachments = mData.getColorAttachments();
for (size_t colorAttachment = 0; colorAttachment < colorAttachments.size(); colorAttachment++)
......
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