Similar as for AUX1-3, these enums aren't invalid (i.e. -1) but also not
supported by mesa. Returning BUFFER_COUNT causes the proper error to be
returned by ReadBuffer and other functions. This resolves some failures
in
dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.read_buffer
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
case GL_COLOR_ATTACHMENT7_EXT:
return BUFFER_BIT_COLOR7;
default:
+ /* not an error, but also not supported */
+ if (buffer >= GL_COLOR_ATTACHMENT8 && buffer <= GL_COLOR_ATTACHMENT31)
+ return 1 << BUFFER_COUNT;
/* error */
return BAD_MASK;
}
case GL_COLOR_ATTACHMENT7_EXT:
return BUFFER_COLOR7;
default:
+ /* not an error, but also not supported */
+ if (buffer >= GL_COLOR_ATTACHMENT8 && buffer <= GL_COLOR_ATTACHMENT31)
+ return BUFFER_COUNT;
/* error */
return -1;
}