Bug 1240438 - Fix WebGL2 framebuffer attachment related implementation. r=jgilbert

This commit is contained in:
Ethan Lin 2016-01-29 01:41:00 +01:00
parent f5c1ebd63a
commit cb610b6ed7

View File

@ -847,11 +847,10 @@ WebGLFramebuffer::PrecheckFramebufferStatus(nsCString* const out_info) const
if (HasIncompleteAttachments(out_info))
return LOCAL_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
if (!mContext->IsWebGL2()) {
// INCOMPLETE_DIMENSIONS doesn't exist in GLES3.
if (!AllImageRectsMatch())
return LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS; // Inconsistent sizes
if (!AllImageRectsMatch())
return LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS; // Inconsistent sizes
if (!mContext->IsWebGL2()) {
const auto depthOrStencilCount = int(mDepthAttachment.IsDefined()) +
int(mStencilAttachment.IsDefined()) +
int(mDepthStencilAttachment.IsDefined());