On Thu, 2009-04-16 at 23:11 -0500, Mario Limonciello wrote:
> 
> I've been trying to debug a problem that cropped up recently between
> the switch to Xorg server 1.5 and Mesa 7.4 in Ubuntu 9.04.  MythTV
> 0.21 (based on QT3) would no longer open properly on machines using
> RADEON DRI.  Something similar happened recently for those using
> swrast, and it turned out that a patch to expose more fbconfigs in
> swrast by Eric Anholt solved the problem.  I took this idea and wrote
> a small patch doing similar in RADEON dri, and sure it enough it
> solved the problem there too.

[...]

> -   return radeonFillInModes( psp,
> -                            dri_priv->bpp,
> -                            (dri_priv->bpp == 16) ? 16 : 24,
> -                            (dri_priv->bpp == 16) ? 0  : 8,
> -                            (dri_priv->backOffset != dri_priv->depthOffset) 
> );
> +    configs8  = radeonFillInModes(psp,  8,  8, 0, (dri_priv->backOffset != 
> dri_priv->depthOffset));
> +    configs16 = radeonFillInModes(psp, 16, 16, 0, (dri_priv->backOffset != 
> dri_priv->depthOffset));
> +    configs24 = radeonFillInModes(psp, 24, 24, 8, (dri_priv->backOffset != 
> dri_priv->depthOffset));
> +    configs32 = radeonFillInModes(psp, 32, 24, 8, (dri_priv->backOffset != 
> dri_priv->depthOffset));

I don't think this makes sense, in particular, I don't think
radeonFillInModes() can really handle the 8 and 24 cases.

Git master (e798bf8053612516420a4ec42e2ff58433abd521) and
mesa_7_4_branch (775ca8e3fa5ddf090115907c78889ed8311cd3ae) already have
a change which I suspect will help for your problem, can you try it? If
it doesn't help, please try the patch below which I've been testing on
top of that. If that still doesn't help, please provide glxinfo output
from these patches and your patch.


diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c 
b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 8828533..e69357a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -257,6 +257,8 @@ radeonFillInModes( __DRIscreenPrivate *psp,
                   unsigned pixel_bits, unsigned depth_bits,
                   unsigned stencil_bits, GLboolean have_back_buffer )
 {
+    __DRIconfig **configs_a8r8g8b8;
+    __DRIconfig **configs_r5g6b5;
     __DRIconfig **configs;
     __GLcontextModes *m;
     unsigned depth_buffer_factor;
@@ -291,26 +293,21 @@ radeonFillInModes( __DRIscreenPrivate *psp,
     depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
     back_buffer_factor  = (have_back_buffer) ? 2 : 1;
 
-    if (pixel_bits == 16) {
-       __DRIconfig **configs_a8r8g8b8;
-       __DRIconfig **configs_r5g6b5;
-
-       configs_r5g6b5 = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
-                                         depth_bits_array, stencil_bits_array,
-                                         depth_buffer_factor, 
back_buffer_modes,
-                                         back_buffer_factor, 
msaa_samples_array,
-                                         1);
-       configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, 
GL_UNSIGNED_INT_8_8_8_8_REV,
-                                           depth_bits_array, 
stencil_bits_array,
-                                           1, back_buffer_modes, 1,
-                                           msaa_samples_array, 1);
+    configs_r5g6b5 = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
+                                     depth_bits_array, stencil_bits_array,
+                                     depth_buffer_factor, back_buffer_modes,
+                                     back_buffer_factor, msaa_samples_array,
+                                     1);
+    configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
+                                       depth_bits_array, stencil_bits_array,
+                                       depth_buffer_factor,
+                                       back_buffer_modes, back_buffer_factor,
+                                       msaa_samples_array, 1);
+
+    if (pixel_bits == 16)
        configs = driConcatConfigs(configs_r5g6b5, configs_a8r8g8b8);
-   } else
-       configs = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
-                                  depth_bits_array, stencil_bits_array,
-                                  depth_buffer_factor,
-                                  back_buffer_modes, back_buffer_factor,
-                                  msaa_samples_array, 1);
+    else
+       configs = driConcatConfigs(configs_a8r8g8b8, configs_r5g6b5);
 
     if (configs == NULL) {
        fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to