[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'ubuntu'



 debian/changelog                                                  |   12 +
 debian/control                                                    |    2 
 debian/patches/103_savage-expose_fbmodes_with_nonzero_alpha.patch |   94 ++++++++++
 debian/patches/series                                             |    1 
 4 files changed, 108 insertions(+), 1 deletion(-)

New commits:
commit 422c6b06caeef4e194551ca1ff28eb3b83b52afa
Author: Bryce Harrington <bryce@bryceharrington.org>
Date:   Thu Apr 15 00:14:51 2010 -0700

    savage patch

diff --git a/debian/patches/103_savage-expose_fbmodes_with_nonzero_alpha.patch b/debian/patches/103_savage-expose_fbmodes_with_nonzero_alpha.patch
new file mode 100644
index 0000000..ce65a1c
--- /dev/null
+++ b/debian/patches/103_savage-expose_fbmodes_with_nonzero_alpha.patch
@@ -0,0 +1,94 @@
+--- mesa-7.7.orig/src/mesa/drivers/dri/savage/savage_xmesa.c
++++ mesa-7.7/src/mesa/drivers/dri/savage/savage_xmesa.c
+@@ -63,6 +63,8 @@
+ 
+ #include "xmlpool.h"
+ 
++#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
++
+ /* Driver-specific options
+  */
+ #define SAVAGE_ENABLE_VDMA(def) \
+@@ -888,29 +890,30 @@ savageFillInModes( __DRIscreenPrivate *p
+ 		   unsigned stencil_bits, GLboolean have_back_buffer )
+ {
+     __DRIconfig **configs;
++    __DRIconfig **configs_a8r8g8b8;
++    __DRIconfig **configs_x8r8g8b8;
+     __GLcontextModes * m;
+     unsigned depth_buffer_factor;
+     unsigned back_buffer_factor;
+-    GLenum fb_format;
+-    GLenum fb_type;
++    uint8_t depth_bits_array[2];
++    uint8_t stencil_bits_array[2];
++    uint8_t msaa_samples_array[1];
+     int i;
+ 
+     /* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
+      * enough to add support.  Basically, if a context is created with an
+      * fbconfig where the swap method is GLX_SWAP_COPY_OML, pageflipping
+      * will never be used.
+-     *
+-     * FK: What about drivers that don't use page flipping? Could they
+-     * just expose GLX_SWAP_COPY_OML?
+      */
+     static const GLenum back_buffer_modes[] = {
+ 	GLX_NONE, GLX_SWAP_UNDEFINED_OML /*, GLX_SWAP_COPY_OML */
+     };
+ 
+-    uint8_t depth_bits_array[2];
+-    uint8_t stencil_bits_array[2];
+-    uint8_t msaa_samples_array[1];
+-
++    /* This being a DRI1 driver the depth buffer is always allocated,
++     * so it does not make sense to expose visuals without it. If this
++     * driver ever gets ported to DRI2 the first array value should be
++     * changed to 0 to expose modes without a depth buffer.
++     */
+     depth_bits_array[0] = depth_bits;
+     depth_bits_array[1] = depth_bits;
+     
+@@ -925,21 +928,32 @@ savageFillInModes( __DRIscreenPrivate *p
+ 
+     depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
+     back_buffer_factor  = (have_back_buffer) ? 2 : 1;
+-
++    
+     if ( pixel_bits == 16 ) {
+-        fb_format = GL_RGB;
+-        fb_type = GL_UNSIGNED_SHORT_5_6_5;
++        configs = 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);
+     }
+     else {
+-        fb_format = GL_BGR;
+-        fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
++        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);
++        configs_x8r8g8b8 = driCreateConfigs(GL_BGR, 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);
++        configs = driConcatConfigs(configs_a8r8g8b8, configs_x8r8g8b8);
+     }
+ 
+-    configs = driCreateConfigs(fb_format, fb_type,
+-			       depth_bits_array, stencil_bits_array,
+-			       depth_buffer_factor,
+-			       back_buffer_modes, back_buffer_factor,
+-                               msaa_samples_array, 1);
+     if (configs == NULL) {
+ 	fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
+ 		 __func__, __LINE__ );

commit 6b716825548bf7678dc25bbc872e11ed0fb6adc7
Author: Bryce Harrington <bryce@bryceharrington.org>
Date:   Thu Apr 15 00:14:08 2010 -0700

    Fix savage

diff --git a/debian/changelog b/debian/changelog
index bb85f35..a7b359f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+mesa (7.7.1-1ubuntu2) lucid; urgency=low
+
+  * Add 103_savage-expose_fbmodes_with_nonzero_alpha.patch: Expose
+    fbmodes with non-zero alpha depth.  Fixes issue where clutter apps
+    crash when using the savage driver.  Thanks to knarf for developing
+    the fix.
+    (LP: #467474)
+  * mesa-common-dev should depend on libdrm-dev
+    (LP: #490811)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Wed, 14 Apr 2010 12:06:00 -0700
+
 mesa (7.7.1-1ubuntu1) lucid; urgency=low
 
   [ Alberto Milone ]
diff --git a/debian/control b/debian/control
index 0cdb7eb..6a6f156 100644
--- a/debian/control
+++ b/debian/control
@@ -245,7 +245,7 @@ Package: mesa-common-dev
 Section: libdevel
 Architecture: any
 Replaces: xlibmesa-gl-dev (<< 1:7), xlibosmesa-dev, libgl1-mesa-swx11-dev (<< 6.5.2), libgl1-mesa-dev (<< 7.5~rc4-2)
-Depends: libx11-dev
+Depends: libx11-dev, libdrm-dev
 Description: Developer documentation for Mesa
  This package includes the specifications for the Mesa-specific OpenGL
  extensions, the complete set of release notes and the development header
diff --git a/debian/patches/series b/debian/patches/series
index 536e86e..8a6809d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 101_ubuntu_hidden_glname.patch
 102_dont_vblank.diff
 107_glxgears_is_not_a_benchmark.patch
+103_savage-expose_fbmodes_with_nonzero_alpha.patch


Reply to: