summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-10-02 15:03:07 -0700
committerIan Romanick <[email protected]>2011-10-04 12:25:57 -0700
commit2e3a4ab818a798b592210f7ae7ec149b3b3c0a05 (patch)
tree50c5fe62648cb5ceff09a704533e613fb4067950 /src/mesa/main
parent43251b970d2d4969b0166aaea50383479a09c3bc (diff)
mesa/es: Allow other color attachments in OpenGL ES 2.0
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 6e54c09d7c7..1d3980607f6 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -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];