summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fallback.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-12-20 11:29:39 -0800
committerEric Anholt <eric@anholt.net>2007-12-20 11:32:55 -0800
commitbea6b5fe5aa3138cec8d057766ae48da4aa57dee (patch)
treee8d284075cce8eaf1afdb8a83d5130a9f20bca64 /src/mesa/drivers/dri/i965/brw_fallback.c
parent106f3982203377949bd1a232008e4e0f0b9275db (diff)
[965] Enable EXT_framebuffer_object.
To do so, merge the remainnig necessary code from the buffers, blit, span, and screen code to shared, and replace it with those.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fallback.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c
index 3925dcf37b..3c4c60a3ea 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.c
+++ b/src/mesa/drivers/dri/i965/brw_fallback.c
@@ -45,7 +45,8 @@ static GLboolean do_check_fallback(struct brw_context *brw)
{
GLcontext *ctx = &brw->intel.ctx;
GLuint i;
-
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
+
/* BRW_NEW_METAOPS
*/
if (brw->metaops.active)
@@ -58,11 +59,15 @@ static GLboolean do_check_fallback(struct brw_context *brw)
/* _NEW_BUFFERS
*/
- if (ctx->DrawBuffer->_ColorDrawBufferMask[0] != BUFFER_BIT_FRONT_LEFT &&
- ctx->DrawBuffer->_ColorDrawBufferMask[0] != BUFFER_BIT_BACK_LEFT) {
- DBG("FALLBACK: draw buffer %d: 0x%08x\n",
- ctx->DrawBuffer->_ColorDrawBufferMask[0]);
- return GL_TRUE;
+ /* We can only handle a single draw buffer at the moment, and only as the
+ * first color buffer.
+ */
+ for (i = 0; i < MAX_DRAW_BUFFERS; i++) {
+ if (fb->_NumColorDrawBuffers[i] > (i == 0 ? 1 : 0)) {
+ DBG("FALLBACK: draw buffer %d: 0x%08x\n",
+ i, ctx->DrawBuffer->_ColorDrawBufferMask[i]);
+ return GL_TRUE;
+ }
}
/* _NEW_RENDERMODE