Commit 18d412cb by James Darpinian Committed by Commit Bot

Fix readBuffer validation

The argument to glReadBuffer should be validated against GL_MAX_COLOR_ATTACHMENTS, not GL_MAX_DRAW_BUFFERS. Bug: angleproject:4766 Change-Id: Ic184934bd01e68b936266eae69543ae66fd68ea3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2252978Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent 054aeeed
......@@ -1661,9 +1661,9 @@ bool ValidateReadBuffer(const Context *context, GLenum src)
{
GLuint drawBuffer = static_cast<GLuint>(src - GL_COLOR_ATTACHMENT0);
if (drawBuffer >= static_cast<GLuint>(context->getCaps().maxDrawBuffers))
if (drawBuffer >= static_cast<GLuint>(context->getCaps().maxColorAttachments))
{
context->validationError(GL_INVALID_OPERATION, kExceedsMaxDrawBuffers);
context->validationError(GL_INVALID_OPERATION, kExceedsMaxColorAttachments);
return false;
}
}
......
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