aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2005-01-14 13:02:53 +0000
committerAlan Hourihane <[email protected]>2005-01-14 13:02:53 +0000
commit38595eda3912c29b48b4e5ddef39aab7b7dec17a (patch)
tree3108596a3e9a9c78f608d1e866bd1f22eaf85441 /src/mesa/drivers/dri/unichrome
parent96d375c682fdefbd0cfe0cfa26c1d3ef41ebed87 (diff)
16bpp doesn't support masked clears, so fallback when they're enabled.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index c7b616f4057..7e7b933becb 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
@@ -242,6 +242,16 @@ static void viaClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
}
}
}
+
+ /* 16bpp doesn't support masked clears */
+ if (vmesa->viaScreen->bytesPerPixel == 2 &&
+ vmesa->ClearMask & 0xf0000000) {
+ if (flag & VIA_FRONT)
+ mask |= DD_FRONT_LEFT_BIT;
+ if (flag & VIA_BACK)
+ mask |= DD_BACK_LEFT_BIT;
+ flag &= ~(VIA_FRONT | VIA_BACK);
+ }
if (flag) {
drm_clip_rect_t *boxes, *tmp_boxes = 0;