Module: Mesa Branch: 7.11 Commit: 4258e9b3a5eeaa90f2a0485576d7d17d6d8e4d6f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4258e9b3a5eeaa90f2a0485576d7d17d6d8e4d6f
Author: Marc Pignat <[email protected]> Date: Tue Jun 28 15:21:58 2011 +0200 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 <marc at pignat.org> Signed-off-by: Brian Paul <[email protected]> (cherry picked from commit cfec000e7514342fd51859906e173ba2d474a55c) --- src/glx/drisw_glx.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 07d4955..a57b327 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; } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
