Commit 519b657b by Alexis Hetu Committed by Alexis Hétu

Fixed expected state when using different images for depth and stencil

When depth and stencil are both present, they must be the same image, or return GL_FRAMEBUFFER_UNSUPPORTED, according to the GLES 3.0 spec, section 4.4.4, Framebuffer Completeness. Change-Id: I607c05617fb55743635eda987da6de523385d92b Reviewed-on: https://swiftshader-review.googlesource.com/5262Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 0bac285a
......@@ -472,6 +472,16 @@ GLenum Framebuffer::completeness(int &width, int &height, int &samples)
}
}
if((egl::getClientVersion() >= 3) && depthbuffer && stencilbuffer && (depthbuffer != stencilbuffer))
{
// In the GLES 3.0 spec, section 4.4.4, Framebuffer Completeness:
// "The framebuffer object target is said to be framebuffer complete if all the following conditions are true:
// [...]
// Depth and stencil attachments, if present, are the same image.
// { FRAMEBUFFER_UNSUPPORTED }"
return GL_FRAMEBUFFER_UNSUPPORTED;
}
// We need to have at least one attachment to be complete
if(width == -1 || height == -1)
{
......
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