summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-05-03 17:35:40 -0600
committerBrian Paul <[email protected]>2010-05-03 17:35:40 -0600
commite2ea69afef2eeeb31b73772c3bf8ef696dadbc17 (patch)
tree1605f9ab2084d87861bc358f618ed2fae58f8ea3 /src/mesa
parent8b0c217f2bc123bffd25cc4977d6abb1b3fa8186 (diff)
mesa: increase MAX_DRAW_BUFFERS to 8
Required for GL 3.x
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/config.h2
-rw-r--r--src/mesa/main/context.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 30b48e4bd08..84f7665fc07 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -250,7 +250,7 @@
/** For GL_ARB_draw_buffers */
/*@{*/
-#define MAX_DRAW_BUFFERS 4
+#define MAX_DRAW_BUFFERS 8
/*@}*/
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 0963e75f35e..196a641bc04 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -652,6 +652,9 @@ check_context_limits(GLcontext *ctx)
assert(ctx->Const.MaxDrawBuffers <= MAX_DRAW_BUFFERS);
+ /* if this fails, add more enum values to gl_buffer_index */
+ assert(BUFFER_COLOR0 + MAX_DRAW_BUFFERS <= BUFFER_COUNT);
+
/* XXX probably add more tests */
}