Mesa (master): i965: Add support for all 8 possible ARB_draw_buffers in Mesa.

Eric Anholt anholt at kemper.freedesktop.org
Mon May 24 00:00:13 UTC 2010


Module: Mesa
Branch: master
Commit: 9b775c1e589b7ce95a1ec3e85e45bb9288ceb289
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b775c1e589b7ce95a1ec3e85e45bb9288ceb289

Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 23 13:39:42 2010 -0700

i965: Add support for all 8 possible ARB_draw_buffers in Mesa.

We should be able to do 16, but are limited by Mesa's static buffer
allocations.

---

 src/mesa/drivers/dri/i965/brw_context.h    |    2 +-
 src/mesa/drivers/dri/intel/intel_context.c |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index a97fcb0..500cd32 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -252,7 +252,7 @@ struct brw_vs_ouput_sizes {
 #define BRW_MAX_TEX_UNIT 16
 
 /** Max number of render targets in a shader */
-#define BRW_MAX_DRAW_BUFFERS 4
+#define BRW_MAX_DRAW_BUFFERS 8
 
 /**
  * Size of our surface binding table for the WM.
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 05d4998..9159f6e 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -716,7 +716,6 @@ intelInitContext(struct intel_context *intel,
    _mesa_init_point(ctx);
 
    meta_init_metaops(ctx, &intel->meta);
-   ctx->Const.MaxColorAttachments = 4;  /* XXX FBO: review this */
    if (intel->gen >= 4) {
       if (MAX_WIDTH > 8192)
 	 ctx->Const.MaxRenderbufferSize = 8192;




More information about the mesa-commit mailing list