diff options
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810state.c')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810state.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c index e0d5b2b4876..185c098b5e1 100644 --- a/src/mesa/drivers/dri/i810/i810state.c +++ b/src/mesa/drivers/dri/i810/i810state.c @@ -292,18 +292,20 @@ void i810DrawBuffer(GLcontext *ctx, GLenum mode ) i810ContextPtr imesa = I810_CONTEXT(ctx); int front = 0; - /* - * _DrawDestMask is easier to cope with than <mode>. - */ - switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0]) { - case BUFFER_BIT_FRONT_LEFT: + if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) { + /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */ + FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_TRUE ); + return; + } + + switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0]) { + case BUFFER_FRONT_LEFT: front = 1; break; - case BUFFER_BIT_BACK_LEFT: + case BUFFER_BACK_LEFT: front = 0; break; default: - /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */ FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_TRUE ); return; } |