mesa/es: Allow other color attachments in OpenGL ES 2.0

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Ian Romanick
2011-10-02 15:03:07 -07:00
parent 43251b970d
commit 2e3a4ab818
+5 -1
View File
@@ -240,9 +240,13 @@ _mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
case GL_COLOR_ATTACHMENT13_EXT:
case GL_COLOR_ATTACHMENT14_EXT:
case GL_COLOR_ATTACHMENT15_EXT:
/* Only OpenGL ES 1.x forbids color attachments other than
* GL_COLOR_ATTACHMENT0. For all other APIs the limit set by the
* hardware is used.
*/
i = attachment - GL_COLOR_ATTACHMENT0_EXT;
if (i >= ctx->Const.MaxColorAttachments
|| (i > 0 && ctx->API != API_OPENGL)) {
|| (i > 0 && ctx->API == API_OPENGLES)) {
return NULL;
}
return &fb->Attachment[BUFFER_COLOR0 + i];