From cfec000e7514342fd51859906e173ba2d474a55c Mon Sep 17 00:00:00 2001 From: Marc Pignat Date: Tue, 28 Jun 2011 15:21:58 +0200 Subject: drisw: Fix 24bpp software rendering, take 2 This patch add the support for 24bpp in the dri/swrast implementation. See http://bugs.freedesktop.org/show_bug.cgi?id=23525 Signed-off-by: Marc Pignat Signed-off-by: Brian Paul --- src/glx/drisw_glx.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/glx/drisw_glx.c') diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index d0137ee..7bd6450 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -100,6 +100,13 @@ XCreateDrawable(struct drisw_drawable * pdp, 32, /* bitmap_pad */ 0); /* bytes_per_line */ + /** + * swrast does not handle 24-bit depth with 24 bpp, so let X do the + * the conversion for us. + */ + if (pdp->ximage->bits_per_pixel == 24) + pdp->ximage->bits_per_pixel = 32; + return True; } -- cgit v1.1