Mesa (master): mesa: increase MAX_DRAW_BUFFERS to 8
Brian Paul
brianp at kemper.freedesktop.org
Mon May 3 23:36:05 UTC 2010
Module: Mesa
Branch: master
Commit: e2ea69afef2eeeb31b73772c3bf8ef696dadbc17
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2ea69afef2eeeb31b73772c3bf8ef696dadbc17
Author: Brian Paul <brianp at vmware.com>
Date: Mon May 3 17:35:40 2010 -0600
mesa: increase MAX_DRAW_BUFFERS to 8
Required for GL 3.x
---
src/mesa/main/config.h | 2 +-
src/mesa/main/context.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 30b48e4..84f7665 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 0963e75..196a641 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 */
}
More information about the mesa-commit
mailing list