Hi,

I made two small modifications to the radeon driver to make OpenGL look
much nicer with 16bpp. The first thing is to enable dithering, the
second is to use 32bpp textures even in 16bpp mode, if the application
requests them. A patch is attached.

Maybe the texture color depth should be handled more intelligently in
16bpp mode, based on the amount of graphics memory or controlled by an
environment variable?

Regards,
   Felix

               __\|/__    ___     ___     ___
__Tschüß_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___
_____Felix_______\Ä/\ \_____\ \_____\ \______U___just not everything____
  [EMAIL PROTECTED]    >o<__/   \___/   \___/        at the same time!
Index: radeon_state_init.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c,v
retrieving revision 1.6
diff -u -r1.6 radeon_state_init.c
--- radeon_state_init.c 25 Nov 2002 19:58:28 -0000      1.6
+++ radeon_state_init.c 1 Dec 2002 12:49:17 -0000
@@ -337,6 +337,8 @@
    rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] = (RADEON_PLANE_MASK_ENABLE |
                                       color_fmt |
                                       (1<<15));
+   if (color_fmt == RADEON_COLOR_FORMAT_RGB565)
+       rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_DITHER_ENABLE;
 
    rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset &
                                              RADEON_COLOROFFSET_MASK);
Index: radeon_tex.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v
retrieving revision 1.22
diff -u -r1.22 radeon_tex.c
--- radeon_tex.c        25 Nov 2002 19:58:29 -0000      1.22
+++ radeon_tex.c        1 Dec 2002 12:49:18 -0000
@@ -213,7 +213,7 @@
                            GLenum format, GLenum type )
 {
    radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-   const GLboolean do32bpt = ( rmesa->radeonScreen->cpp == 4 );
+   const GLboolean do32bpt = 1 /*( rmesa->radeonScreen->cpp == 4 )*/;
 
    switch ( internalFormat ) {
    case 4:

Reply via email to