[Fix] (MG_Impl): accept COLOR when invalidating the default framebuffer

The validation added with the invalidation entry points took the default framebuffer's
buffers to be only FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, DEPTH and STENCIL, so a
call naming COLOR came back INVALID_ENUM. The by-name forms spell the colour buffer the way
glClearNamedFramebuffer does - COLOR, DEPTH, STENCIL - while the target forms use the
individual left/right tokens, and both spellings arrive at the same validation, so both sets
belong there (GL 4.6 core 17.4.4).

Caught by framebuffers_invalidate_data and framebuffers_invalidate_subdata, which had been
passing while the entry points were stubs doing nothing at all. Those two plus
invalidate_data_and_subdata_errors now pass together on both backends.
This commit is contained in:
BZLZHH
2026-08-05 00:51:12 -04:00
parent efeb24ff9b
commit 4873da6844
@@ -1691,6 +1691,11 @@ namespace MobileGL::MG_Impl::GLImpl {
const GLenum attachment = attachments[at];
if (isDefaultFramebuffer) {
switch (attachment) {
// The by-name forms name the default framebuffer's buffers the way
// glClearNamedFramebuffer does, with COLOR standing for the colour buffer, while
// the target forms use the individual FRONT_LEFT/BACK_RIGHT tokens. Both spellings
// reach here, so both are accepted (GL 4.6 core 17.4.4).
case GL_COLOR:
case GL_FRONT_LEFT:
case GL_FRONT_RIGHT:
case GL_BACK_LEFT: