summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c6
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 1551be5e75..a06b65224d 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -736,8 +736,8 @@ void viaXMesaWindowMoved(struct via_context *vmesa)
draw_buffer = (struct via_renderbuffer *) drawable->driverPrivate;
read_buffer = (struct via_renderbuffer *) readable->driverPrivate;
- switch (vmesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0]) {
- case BUFFER_BIT_BACK_LEFT:
+ switch (vmesa->glCtx->DrawBuffer->_ColorDrawBufferIndexes[0]) {
+ case BUFFER_BACK_LEFT:
if (drawable->numBackClipRects == 0) {
vmesa->numClipRects = drawable->numClipRects;
vmesa->pClipRects = drawable->pClipRects;
@@ -747,7 +747,7 @@ void viaXMesaWindowMoved(struct via_context *vmesa)
vmesa->pClipRects = drawable->pBackClipRects;
}
break;
- case BUFFER_BIT_FRONT_LEFT:
+ case BUFFER_FRONT_LEFT:
vmesa->numClipRects = drawable->numClipRects;
vmesa->pClipRects = drawable->pClipRects;
break;
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index bccdbe9326..d2c528923f 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -656,13 +656,18 @@ static void viaDrawBuffer(GLcontext *ctx, GLenum mode)
if (!ctx->DrawBuffer)
return;
- switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
- case BUFFER_BIT_FRONT_LEFT:
+ if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) {
+ FALLBACK(vmesa, VIA_FALLBACK_DRAW_BUFFER, GL_TRUE);
+ return;
+ }
+
+ switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
+ case BUFFER_FRONT_LEFT:
VIA_FLUSH_DMA(vmesa);
vmesa->drawBuffer = &vmesa->front;
FALLBACK(vmesa, VIA_FALLBACK_DRAW_BUFFER, GL_FALSE);
break;
- case BUFFER_BIT_BACK_LEFT:
+ case BUFFER_BACK_LEFT:
VIA_FLUSH_DMA(vmesa);
vmesa->drawBuffer = &vmesa->back;
FALLBACK(vmesa, VIA_FALLBACK_DRAW_BUFFER, GL_FALSE);