Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 18d412c

Browse files
jdarpinianCommit Bot
authored and
Commit Bot
committed
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/+/2252978 Reviewed-by: Kenneth Russell <[email protected]> Reviewed-by: Jonah Ryan-Davis <[email protected]> Commit-Queue: Kenneth Russell <[email protected]>
1 parent 054aeee commit 18d412c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libANGLE/validationES3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,9 +1661,9 @@ bool ValidateReadBuffer(const Context *context, GLenum src)
16611661
{
16621662
GLuint drawBuffer = static_cast<GLuint>(src - GL_COLOR_ATTACHMENT0);
16631663

1664-
if (drawBuffer >= static_cast<GLuint>(context->getCaps().maxDrawBuffers))
1664+
if (drawBuffer >= static_cast<GLuint>(context->getCaps().maxColorAttachments))
16651665
{
1666-
context->validationError(GL_INVALID_OPERATION, kExceedsMaxDrawBuffers);
1666+
context->validationError(GL_INVALID_OPERATION, kExceedsMaxColorAttachments);
16671667
return false;
16681668
}
16691669
}

0 commit comments

Comments
 (0)