Commit 137364a7 by Alexis Hetu Committed by Alexis Hétu

Framebuffer completeness multisample fix

Framebuffer completeness, usually verified through glCheckFramebufferStatus, should return GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE when the number of samples is not the same for all attached renderbuffers. Change-Id: I8d29895c6d4ded26847ce47fbd2581bbf06ed1bf Reviewed-on: https://swiftshader-review.googlesource.com/4363Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent e23029a7
......@@ -314,7 +314,16 @@ GLenum Framebuffer::completeness(int &width, int &height, int &samples)
width = colorbuffer->getWidth();
height = colorbuffer->getHeight();
samples = colorbuffer->getSamples();
if(samples == -1)
{
samples = colorbuffer->getSamples();
}
else if(samples != colorbuffer->getSamples())
{
return GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE;
}
}
}
......
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