From 4f2860a0b43e7d4a53b1dd47d0aba6d25f51b085 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 27 Apr 2011 13:15:13 -0400 Subject: [PATCH 01/12] dead patch removal --- mesa-7.1-osmesa-version.patch | 12 - mesa-7.3-965-texture-size.patch | 16 - mesa-7.3-dri-configs-fixes.patch | 1001 ----------------------- mesa-7.5-get-driver-name.patch | 85 -- mesa-intel-snb-regression-reverts.patch | 125 --- 5 files changed, 1239 deletions(-) delete mode 100644 mesa-7.1-osmesa-version.patch delete mode 100644 mesa-7.3-965-texture-size.patch delete mode 100644 mesa-7.3-dri-configs-fixes.patch delete mode 100644 mesa-7.5-get-driver-name.patch delete mode 100644 mesa-intel-snb-regression-reverts.patch diff --git a/mesa-7.1-osmesa-version.patch b/mesa-7.1-osmesa-version.patch deleted file mode 100644 index 177c0c3..0000000 --- a/mesa-7.1-osmesa-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up Mesa-7.1/src/mesa/drivers/osmesa/Makefile.jx Mesa-7.1/src/mesa/drivers/osmesa/Makefile ---- Mesa-7.1/src/mesa/drivers/osmesa/Makefile.jx 2008-08-28 14:05:47.000000000 -0400 -+++ Mesa-7.1/src/mesa/drivers/osmesa/Makefile 2008-08-28 14:07:13.000000000 -0400 -@@ -46,7 +46,7 @@ osmesa8: $(TOP)/lib/$(OSMESA_LIB_NAME) - - $(TOP)/lib/$(OSMESA_LIB_NAME): $(OBJECTS) - $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ -- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ -+ -major 6 -minor 5 -patch 3 \ - -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \ - -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \ - $(OSMESA_LIB_DEPS) $(OBJECTS) diff --git a/mesa-7.3-965-texture-size.patch b/mesa-7.3-965-texture-size.patch deleted file mode 100644 index 59bfd83..0000000 --- a/mesa-7.3-965-texture-size.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up Mesa-7.3/src/mesa/drivers/dri/i965/brw_context.c.jx Mesa-7.3/src/mesa/drivers/dri/i965/brw_context.c ---- Mesa-7.3/src/mesa/drivers/dri/i965/brw_context.c.jx 2009-01-21 10:55:47.000000000 -0500 -+++ Mesa-7.3/src/mesa/drivers/dri/i965/brw_context.c 2009-02-09 17:55:02.000000000 -0500 -@@ -138,10 +138,10 @@ GLboolean brwCreateContext( const __GLco - /* Advertise the full hardware capabilities. The new memory - * manager should cope much better with overload situations: - */ -- ctx->Const.MaxTextureLevels = 12; -+ ctx->Const.MaxTextureLevels = 13; - ctx->Const.Max3DTextureLevels = 9; - ctx->Const.MaxCubeTextureLevels = 12; -- ctx->Const.MaxTextureRectSize = (1<<11); -+ ctx->Const.MaxTextureRectSize = (1<<12); - - /* if conformance mode is set, swrast can handle any size AA point */ - ctx->Const.MaxPointSizeAA = 255.0; diff --git a/mesa-7.3-dri-configs-fixes.patch b/mesa-7.3-dri-configs-fixes.patch deleted file mode 100644 index 351bb5f..0000000 --- a/mesa-7.3-dri-configs-fixes.patch +++ /dev/null @@ -1,1001 +0,0 @@ -diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c -index 30c860b..fb2efbb 100644 ---- a/src/mesa/drivers/dri/common/utils.c -+++ b/src/mesa/drivers/dri/common/utils.c -@@ -523,7 +523,8 @@ __DRIconfig ** - driCreateConfigs(GLenum fb_format, GLenum fb_type, - const uint8_t * depth_bits, const uint8_t * stencil_bits, - unsigned num_depth_stencil_bits, -- const GLenum * db_modes, unsigned num_db_modes) -+ const GLenum * db_modes, unsigned num_db_modes, -+ const u_int8_t * msaa_samples, unsigned num_msaa_modes) - { - static const uint8_t bits_table[4][4] = { - /* R G B A */ -@@ -583,9 +584,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, - int index; - __DRIconfig **configs, **c; - __GLcontextModes *modes; -- unsigned i; -- unsigned j; -- unsigned k; -+ unsigned i, j, k, h; - unsigned num_modes; - unsigned num_accum_bits = 2; - -@@ -666,66 +665,74 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, - c = configs; - for ( k = 0 ; k < num_depth_stencil_bits ; k++ ) { - for ( i = 0 ; i < num_db_modes ; i++ ) { -- for ( j = 0 ; j < num_accum_bits ; j++ ) { -- *c = _mesa_malloc (sizeof **c); -- modes = &(*c)->modes; -- c++; -- -- memset(modes, 0, sizeof *modes); -- modes->redBits = bits[0]; -- modes->greenBits = bits[1]; -- modes->blueBits = bits[2]; -- modes->alphaBits = bits[3]; -- modes->redMask = masks[0]; -- modes->greenMask = masks[1]; -- modes->blueMask = masks[2]; -- modes->alphaMask = masks[3]; -- modes->rgbBits = modes->redBits + modes->greenBits -- + modes->blueBits + modes->alphaBits; -- -- modes->accumRedBits = 16 * j; -- modes->accumGreenBits = 16 * j; -- modes->accumBlueBits = 16 * j; -- modes->accumAlphaBits = (masks[3] != 0) ? 16 * j : 0; -- modes->visualRating = (j == 0) ? GLX_NONE : GLX_SLOW_CONFIG; -- -- modes->stencilBits = stencil_bits[k]; -- modes->depthBits = depth_bits[k]; -- -- modes->transparentPixel = GLX_NONE; -- modes->transparentRed = GLX_DONT_CARE; -- modes->transparentGreen = GLX_DONT_CARE; -- modes->transparentBlue = GLX_DONT_CARE; -- modes->transparentAlpha = GLX_DONT_CARE; -- modes->transparentIndex = GLX_DONT_CARE; -- modes->visualType = GLX_DONT_CARE; -- modes->renderType = GLX_RGBA_BIT; -- modes->drawableType = GLX_WINDOW_BIT; -- modes->rgbMode = GL_TRUE; -- -- if ( db_modes[i] == GLX_NONE ) { -- modes->doubleBufferMode = GL_FALSE; -- } -- else { -- modes->doubleBufferMode = GL_TRUE; -- modes->swapMethod = db_modes[i]; -- } -- -- modes->haveAccumBuffer = ((modes->accumRedBits + -+ for ( h = 0 ; h < num_msaa_modes; h++ ) { -+ for ( j = 0 ; j < num_accum_bits ; j++ ) { -+ *c = _mesa_malloc (sizeof **c); -+ modes = &(*c)->modes; -+ c++; -+ -+ memset(modes, 0, sizeof *modes); -+ modes->redBits = bits[0]; -+ modes->greenBits = bits[1]; -+ modes->blueBits = bits[2]; -+ modes->alphaBits = bits[3]; -+ modes->redMask = masks[0]; -+ modes->greenMask = masks[1]; -+ modes->blueMask = masks[2]; -+ modes->alphaMask = masks[3]; -+ modes->rgbBits = modes->redBits + modes->greenBits -+ + modes->blueBits + modes->alphaBits; -+ -+ modes->accumRedBits = 16 * j; -+ modes->accumGreenBits = 16 * j; -+ modes->accumBlueBits = 16 * j; -+ modes->accumAlphaBits = (masks[3] != 0) ? 16 * j : 0; -+ modes->visualRating = (j == 0) ? GLX_NONE : GLX_SLOW_CONFIG; -+ -+ modes->stencilBits = stencil_bits[k]; -+ modes->depthBits = depth_bits[k]; -+ -+ modes->transparentPixel = GLX_NONE; -+ modes->transparentRed = GLX_DONT_CARE; -+ modes->transparentGreen = GLX_DONT_CARE; -+ modes->transparentBlue = GLX_DONT_CARE; -+ modes->transparentAlpha = GLX_DONT_CARE; -+ modes->transparentIndex = GLX_DONT_CARE; -+ modes->visualType = GLX_DONT_CARE; -+ modes->renderType = GLX_RGBA_BIT; -+ modes->drawableType = GLX_WINDOW_BIT; -+ modes->rgbMode = GL_TRUE; -+ -+ if ( db_modes[i] == GLX_NONE ) { -+ modes->doubleBufferMode = GL_FALSE; -+ } -+ else { -+ modes->doubleBufferMode = GL_TRUE; -+ modes->swapMethod = db_modes[i]; -+ } -+ -+ modes->samples = msaa_samples[h]; -+ modes->sampleBuffers = modes->samples ? 1 : 0; -+ -+ -+ modes->haveAccumBuffer = ((modes->accumRedBits + - modes->accumGreenBits + - modes->accumBlueBits + - modes->accumAlphaBits) > 0); -- modes->haveDepthBuffer = (modes->depthBits > 0); -- modes->haveStencilBuffer = (modes->stencilBits > 0); -- -- modes->bindToTextureRgb = GL_TRUE; -- modes->bindToTextureRgba = GL_TRUE; -- modes->bindToMipmapTexture = GL_FALSE; -- modes->bindToTextureTargets = modes->rgbMode ? -- __DRI_ATTRIB_TEXTURE_1D_BIT | -- __DRI_ATTRIB_TEXTURE_2D_BIT | -- __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT : -- 0; -+ modes->haveDepthBuffer = (modes->depthBits > 0); -+ modes->haveStencilBuffer = (modes->stencilBits > 0); -+ -+ modes->bindToTextureRgb = GL_TRUE; -+ modes->bindToTextureRgba = GL_TRUE; -+ modes->bindToMipmapTexture = GL_FALSE; -+ modes->bindToTextureTargets = modes->rgbMode ? -+ __DRI_ATTRIB_TEXTURE_1D_BIT | -+ __DRI_ATTRIB_TEXTURE_2D_BIT | -+ __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT : -+ 0; -+ -+ modes = modes->next; -+ } - } - } - } -@@ -734,9 +741,10 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, - return configs; - } - --const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b) -+__DRIconfig **driConcatConfigs(__DRIconfig **a, -+ __DRIconfig **b) - { -- const __DRIconfig **all; -+ __DRIconfig **all; - int i, j, index; - - i = 0; -diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h -index 0c974db..9e9e5bc 100644 ---- a/src/mesa/drivers/dri/common/utils.h -+++ b/src/mesa/drivers/dri/common/utils.h -@@ -131,9 +131,11 @@ extern __DRIconfig ** - driCreateConfigs(GLenum fb_format, GLenum fb_type, - const uint8_t * depth_bits, const uint8_t * stencil_bits, - unsigned num_depth_stencil_bits, -- const GLenum * db_modes, unsigned num_db_modes); -+ const GLenum * db_modes, unsigned num_db_modes, -+ const uint8_t * msaa_samples, unsigned num_msaa_modes); - --const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b); -+__DRIconfig **driConcatConfigs(__DRIconfig **a, -+ __DRIconfig **b); - - int - driGetConfigAttrib(const __DRIconfig *config, -diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c -index 679f856..b1bb010 100644 ---- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c -+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c -@@ -626,6 +626,7 @@ ffbFillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[3]; - uint8_t stencil_bits_array[3]; -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = 0; - depth_bits_array[1] = depth_bits; -@@ -639,6 +640,8 @@ ffbFillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[1] = 0; - stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; - back_buffer_factor = (have_back_buffer) ? 3 : 1; - -@@ -654,9 +657,10 @@ ffbFillInModes( __DRIscreenPrivate *psp, - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, back_buffer_modes, -- back_buffer_factor); -+ back_buffer_factor, -+ msaa_samples_array, 1); - if (configs == NULL) { -- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, -+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, - __LINE__); - return NULL; - } -diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c -index 48603f5..9a5a39c 100644 ---- a/src/mesa/drivers/dri/i810/i810screen.c -+++ b/src/mesa/drivers/dri/i810/i810screen.c -@@ -77,6 +77,7 @@ i810FillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[2]; - uint8_t stencil_bits_array[2]; -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = depth_bits; - depth_bits_array[1] = depth_bits; -@@ -88,13 +89,16 @@ i810FillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[0] = 0; - stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; - back_buffer_factor = (have_back_buffer) ? 2 : 1; - - 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); -+ back_buffer_modes, back_buffer_factor, -+ msaa_samples_array, 1); - if (configs == NULL) { - fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", - __func__, __LINE__ ); -diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c -index 7042c25..52a28b3 100644 ---- a/src/mesa/drivers/dri/intel/intel_screen.c -+++ b/src/mesa/drivers/dri/intel/intel_screen.c -@@ -467,8 +467,6 @@ intelFillInModes(__DRIscreenPrivate *psp, - __GLcontextModes *m; - unsigned depth_buffer_factor; - unsigned back_buffer_factor; -- GLenum fb_format; -- GLenum fb_type; - int i; - - /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't -@@ -480,6 +478,7 @@ intelFillInModes(__DRIscreenPrivate *psp, - - uint8_t depth_bits_array[3]; - uint8_t stencil_bits_array[3]; -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = 0; - depth_bits_array[1] = depth_bits; -@@ -496,22 +495,39 @@ intelFillInModes(__DRIscreenPrivate *psp, - - stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; - back_buffer_factor = (have_back_buffer) ? 3 : 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_BGRA; -- fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; -+ __DRIconfig **configs_a8r8g8b8; -+ __DRIconfig **configs_x8r8g8b8; -+ -+ 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); - if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, - __LINE__); -@@ -673,6 +689,17 @@ static const - __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) - { - intelScreenPrivate *intelScreen; -+ GLenum fb_format[3]; -+ GLenum fb_type[3]; -+ /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't -+ * support pageflipping at all. -+ */ -+ static const GLenum back_buffer_modes[] = { -+ GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML -+ }; -+ uint8_t depth_bits[4], stencil_bits[4], msaa_samples_array[1]; -+ int color; -+ __DRIconfig **configs = NULL; - - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure -@@ -712,8 +739,50 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) - intelScreen->irq_active = 1; - psp->extensions = intelScreenExtensions; - -- return driConcatConfigs(intelFillInModes(psp, 16, 16, 0, 1), -- intelFillInModes(psp, 32, 24, 8, 1)); -+ depth_bits[0] = 0; -+ stencil_bits[0] = 0; -+ depth_bits[1] = 16; -+ stencil_bits[1] = 0; -+ depth_bits[2] = 24; -+ stencil_bits[2] = 0; -+ depth_bits[3] = 24; -+ stencil_bits[3] = 8; -+ -+ msaa_samples_array[0] = 0; -+ -+ fb_format[0] = GL_RGB; -+ fb_type[0] = GL_UNSIGNED_SHORT_5_6_5; -+ -+ fb_format[1] = GL_BGR; -+ fb_type[1] = GL_UNSIGNED_INT_8_8_8_8_REV; -+ -+ fb_format[2] = GL_BGRA; -+ fb_type[2] = GL_UNSIGNED_INT_8_8_8_8_REV; -+ -+ for (color = 0; color < ARRAY_SIZE(fb_format); color++) { -+ __DRIconfig **new_configs; -+ -+ new_configs = driCreateConfigs(fb_format[color], fb_type[color], -+ depth_bits, -+ stencil_bits, -+ ARRAY_SIZE(depth_bits), -+ back_buffer_modes, -+ ARRAY_SIZE(back_buffer_modes), -+ msaa_samples_array, -+ ARRAY_SIZE(msaa_samples_array)); -+ if (configs == NULL) -+ configs = new_configs; -+ else -+ configs = driConcatConfigs(configs, new_configs); -+ } -+ -+ if (configs == NULL) { -+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, -+ __LINE__); -+ return NULL; -+ } -+ -+ return (const __DRIconfig **)configs; - } - - const struct __DriverAPIRec driDriverAPI = { -diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c -index 6bfb4c3..43e5959 100644 ---- a/src/mesa/drivers/dri/mach64/mach64_screen.c -+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c -@@ -93,6 +93,7 @@ mach64FillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[2]; - uint8_t stencil_bits_array[2]; -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = depth_bits; - depth_bits_array[1] = depth_bits; -@@ -104,6 +105,8 @@ mach64FillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[0] = 0; - stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; - back_buffer_factor = (have_back_buffer) ? 2 : 1; - -@@ -119,7 +122,8 @@ mach64FillInModes( __DRIscreenPrivate *psp, - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, back_buffer_modes, -- back_buffer_factor); -+ back_buffer_factor, -+ msaa_samples_array, 1); - if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", - __func__, __LINE__); -diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c -index 86da3a2..af706b3 100644 ---- a/src/mesa/drivers/dri/mga/mga_xmesa.c -+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c -@@ -133,6 +133,7 @@ mgaFillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[3]; - uint8_t stencil_bits_array[3]; -+ uint8_t msaa_samples_array[1]; - - - depth_bits_array[0] = 0; -@@ -147,6 +148,8 @@ mgaFillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[1] = 0; - stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; - back_buffer_factor = (have_back_buffer) ? 2 : 1; - -@@ -162,7 +165,8 @@ mgaFillInModes( __DRIscreenPrivate *psp, - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, -- back_buffer_modes, back_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__ ); -diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c -index cb3a147..7cda4ca 100644 ---- a/src/mesa/drivers/dri/r128/r128_screen.c -+++ b/src/mesa/drivers/dri/r128/r128_screen.c -@@ -422,7 +422,7 @@ r128FillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[2]; - uint8_t stencil_bits_array[2]; -- -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = depth_bits; - depth_bits_array[1] = depth_bits; -@@ -434,6 +434,8 @@ r128FillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[0] = 0; - stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; - back_buffer_factor = (have_back_buffer) ? 2 : 1; - -@@ -446,26 +448,27 @@ r128FillInModes( __DRIscreenPrivate *psp, - fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; - } - -- configs = driCreateConfigs(fb_format, fb_type, -- depth_bits_array, stencil_bits_array, -- depth_buffer_factor, back_buffer_modes, -- back_buffer_factor); -- if (configs == NULL) { -- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, -- __LINE__); -- return NULL; -- } -+ 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__); -+ return NULL; -+ } - -- /* Mark the visual as slow if there are "fake" stencil bits. -- */ -- for (i = 0; configs[i]; i++) { -- m = &configs[i]->modes; -- if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) { -- m->visualRating = GLX_SLOW_CONFIG; -- } -- } -+ /* Mark the visual as slow if there are "fake" stencil bits. -+ */ -+ for (i = 0; configs[i]; i++) { -+ m = &configs[i]->modes; -+ if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) { -+ m->visualRating = GLX_SLOW_CONFIG; -+ } -+ } - -- return (const __DRIconfig **) configs; -+ return (const __DRIconfig **) configs; - } - - -diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c -index 81337da..e3afaa9 100644 ---- a/src/mesa/drivers/dri/radeon/radeon_screen.c -+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c -@@ -274,7 +274,7 @@ radeonFillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[2]; - uint8_t stencil_bits_array[2]; -- -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = depth_bits; - depth_bits_array[1] = depth_bits; -@@ -286,6 +286,8 @@ radeonFillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[0] = 0; - stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; - back_buffer_factor = (have_back_buffer) ? 2 : 1; - -@@ -301,7 +303,8 @@ radeonFillInModes( __DRIscreenPrivate *psp, - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, -- back_buffer_modes, back_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__ ); -diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c -index a344aab..5c835ac 100644 ---- a/src/mesa/drivers/dri/savage/savage_xmesa.c -+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c -@@ -914,7 +914,7 @@ savageFillInModes( __DRIscreenPrivate *psp, - - uint8_t depth_bits_array[2]; - uint8_t stencil_bits_array[2]; -- -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = depth_bits; - depth_bits_array[1] = depth_bits; -@@ -926,6 +926,8 @@ savageFillInModes( __DRIscreenPrivate *psp, - stencil_bits_array[0] = 0; - stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; - back_buffer_factor = (have_back_buffer) ? 2 : 1; - -@@ -941,7 +943,8 @@ savageFillInModes( __DRIscreenPrivate *psp, - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, -- back_buffer_modes, back_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__ ); -diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c -index b1a5d15..9eb27fe 100644 ---- a/src/mesa/drivers/dri/sis/sis_screen.c -+++ b/src/mesa/drivers/dri/sis/sis_screen.c -@@ -77,6 +77,7 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) - }; - uint8_t depth_bits_array[4]; - uint8_t stencil_bits_array[4]; -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = 0; - stencil_bits_array[0] = 0; -@@ -87,6 +88,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) - depth_bits_array[3] = 32; - stencil_bits_array[3] = 0; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = 4; - back_buffer_factor = 2; - -@@ -100,7 +103,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) - - configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, - stencil_bits_array, depth_buffer_factor, -- back_buffer_modes, back_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__); - return NULL; -diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c -index 15b5724..6bfb866 100644 ---- a/src/mesa/drivers/dri/swrast/swrast.c -+++ b/src/mesa/drivers/dri/swrast/swrast.c -@@ -147,6 +147,7 @@ swrastFillInModes(__DRIscreen *psp, - - uint8_t depth_bits_array[4]; - uint8_t stencil_bits_array[4]; -+ uint8_t msaa_samples_array[1]; - - depth_bits_array[0] = 0; - depth_bits_array[1] = 0; -@@ -161,26 +162,38 @@ swrastFillInModes(__DRIscreen *psp, - stencil_bits_array[2] = 0; - stencil_bits_array[3] = (stencil_bits == 0) ? 8 : stencil_bits; - -+ msaa_samples_array[0] = 0; -+ - depth_buffer_factor = 4; - back_buffer_factor = 2; - -- if (pixel_bits == 8) { -+ switch (pixel_bits) { -+ case 8: - fb_format = GL_RGB; - fb_type = GL_UNSIGNED_BYTE_2_3_3_REV; -- } -- else if (pixel_bits == 16) { -+ break; -+ case 16: - fb_format = GL_RGB; - fb_type = GL_UNSIGNED_SHORT_5_6_5; -- } -- else { -+ break; -+ case 24: -+ fb_format = GL_BGR; -+ fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; -+ break; -+ case 32: - fb_format = GL_BGRA; - fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; -+ break; -+ default: -+ fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__, -+ pixel_bits); -+ return NULL; - } - - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, back_buffer_modes, -- back_buffer_factor); -+ back_buffer_factor, msaa_samples_array, 1); - if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, - __LINE__); -@@ -196,7 +209,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions, - { - static const __DRIextension *emptyExtensionList[] = { NULL }; - __DRIscreen *psp; -- __DRIconfig **configs8, **configs16, **configs32; -+ __DRIconfig **configs8, **configs16, **configs24, **configs32; - - (void) data; - -@@ -213,11 +226,13 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions, - - configs8 = swrastFillInModes(psp, 8, 8, 0, 1); - configs16 = swrastFillInModes(psp, 16, 16, 0, 1); -+ configs24 = swrastFillInModes(psp, 24, 24, 8, 1); - configs32 = swrastFillInModes(psp, 32, 24, 8, 1); - -- configs16 = (__DRIconfig **)driConcatConfigs(configs8, configs16); -- -- *driver_configs = driConcatConfigs(configs16, configs32); -+ configs16 = driConcatConfigs(configs8, configs16); -+ configs24 = driConcatConfigs(configs16, configs24); -+ *driver_configs = (const __DRIconfig **) -+ driConcatConfigs(configs24, configs32); - - driInitExtensions( NULL, card_extensions, GL_FALSE ); - -@@ -249,19 +264,24 @@ static GLuint - choose_pixel_format(const GLvisual *v) - { - if (v->rgbMode) { -- int bpp = v->rgbBits; -+ int depth = v->rgbBits; - -- if (bpp == 32 -+ if (depth == 32 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_A8R8G8B8; -- else if (bpp == 16 -+ else if (depth == 24 -+ && v->redMask == 0xff0000 -+ && v->greenMask == 0x00ff00 -+ && v->blueMask == 0x0000ff) -+ return PF_X8R8G8B8; -+ else if (depth == 16 - && v->redMask == 0xf800 - && v->greenMask == 0x07e0 - && v->blueMask == 0x001f) - return PF_R5G6B5; -- else if (bpp == 8 -+ else if (depth == 8 - && v->redMask == 0x07 - && v->greenMask == 0x38 - && v->blueMask == 0xc0) -@@ -290,7 +310,6 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb, - GLenum internalFormat, GLuint width, GLuint height) - { - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -- int bpp; - unsigned mask = PITCH_ALIGN_BITS - 1; - - TRACE; -@@ -299,23 +318,8 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb, - rb->Width = width; - rb->Height = height; - -- switch (internalFormat) { -- case GL_RGB: -- bpp = rb->RedBits + rb->GreenBits + rb->BlueBits; -- break; -- case GL_RGBA: -- bpp = rb->RedBits + rb->GreenBits + rb->BlueBits + rb->AlphaBits; -- break; -- case GL_COLOR_INDEX8_EXT: -- bpp = rb->IndexBits; -- break; -- default: -- _mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ ); -- return GL_FALSE; -- } -- - /* always pad to PITCH_ALIGN_BITS */ -- xrb->pitch = ((width * bpp + mask) & ~mask) / 8; -+ xrb->pitch = ((width * xrb->bpp + mask) & ~mask) / 8; - - return GL_TRUE; - } -@@ -371,6 +375,17 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front) - xrb->Base.GreenBits = 8 * sizeof(GLubyte); - xrb->Base.BlueBits = 8 * sizeof(GLubyte); - xrb->Base.AlphaBits = 8 * sizeof(GLubyte); -+ xrb->bpp = 32; -+ break; -+ case PF_X8R8G8B8: -+ xrb->Base.InternalFormat = GL_RGB; -+ xrb->Base._BaseFormat = GL_RGB; -+ xrb->Base.DataType = GL_UNSIGNED_BYTE; -+ xrb->Base.RedBits = 8 * sizeof(GLubyte); -+ xrb->Base.GreenBits = 8 * sizeof(GLubyte); -+ xrb->Base.BlueBits = 8 * sizeof(GLubyte); -+ xrb->Base.AlphaBits = 0; -+ xrb->bpp = 32; - break; - case PF_R5G6B5: - xrb->Base.InternalFormat = GL_RGB; -@@ -380,6 +395,7 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front) - xrb->Base.GreenBits = 6 * sizeof(GLubyte); - xrb->Base.BlueBits = 5 * sizeof(GLubyte); - xrb->Base.AlphaBits = 0; -+ xrb->bpp = 16; - break; - case PF_R3G3B2: - xrb->Base.InternalFormat = GL_RGB; -@@ -389,12 +405,14 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front) - xrb->Base.GreenBits = 3 * sizeof(GLubyte); - xrb->Base.BlueBits = 2 * sizeof(GLubyte); - xrb->Base.AlphaBits = 0; -+ xrb->bpp = 8; - break; - case PF_CI8: - xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT; - xrb->Base._BaseFormat = GL_COLOR_INDEX; - xrb->Base.DataType = GL_UNSIGNED_BYTE; - xrb->Base.IndexBits = 8 * sizeof(GLubyte); -+ xrb->bpp = 8; - break; - default: - return NULL; -diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h -index a707ffc..1a5fb31 100644 ---- a/src/mesa/drivers/dri/swrast/swrast_priv.h -+++ b/src/mesa/drivers/dri/swrast/swrast_priv.h -@@ -90,6 +90,8 @@ struct swrast_renderbuffer { - - /* renderbuffer pitch (in bytes) */ - GLuint pitch; -+ /* bits per pixel of storage */ -+ GLuint bpp; - }; - - static INLINE __DRIcontext * -@@ -115,10 +117,10 @@ swrast_renderbuffer(struct gl_renderbuffer *rb) - * Pixel formats we support - */ - #define PF_CI8 1 /**< Color Index mode */ --#define PF_A8R8G8B8 2 /**< 32-bit TrueColor: 8-A, 8-R, 8-G, 8-B bits */ --#define PF_R5G6B5 3 /**< 16-bit TrueColor: 5-R, 6-G, 5-B bits */ --#define PF_R3G3B2 4 /**< 8-bit TrueColor: 3-R, 3-G, 2-B bits */ -- -+#define PF_A8R8G8B8 2 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */ -+#define PF_R5G6B5 3 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */ -+#define PF_R3G3B2 4 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */ -+#define PF_X8R8G8B8 5 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */ - - /** - * Renderbuffer pitch alignment (in bits). -diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c -index 5e99036..2d3c25d 100644 ---- a/src/mesa/drivers/dri/swrast/swrast_span.c -+++ b/src/mesa/drivers/dri/swrast/swrast_span.c -@@ -79,6 +79,24 @@ static const GLubyte kernel[16] = { - DST[BCOMP] = SRC[0] - - -+/* 32-bit BGRX */ -+#define STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) \ -+ DST[3] = 0xff; \ -+ DST[2] = VALUE[RCOMP]; \ -+ DST[1] = VALUE[GCOMP]; \ -+ DST[0] = VALUE[BCOMP] -+#define STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) \ -+ DST[3] = 0xff; \ -+ DST[2] = VALUE[RCOMP]; \ -+ DST[1] = VALUE[GCOMP]; \ -+ DST[0] = VALUE[BCOMP] -+#define FETCH_PIXEL_X8R8G8B8(DST, SRC) \ -+ DST[ACOMP] = 0xff; \ -+ DST[RCOMP] = SRC[2]; \ -+ DST[GCOMP] = SRC[1]; \ -+ DST[BCOMP] = SRC[0] -+ -+ - /* 16-bit BGR */ - #define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \ - do { \ -@@ -139,6 +157,24 @@ static const GLubyte kernel[16] = { - #include "swrast/s_spantemp.h" - - -+/* 32-bit BGRX */ -+#define NAME(FUNC) FUNC##_X8R8G8B8 -+#define RB_TYPE GLubyte -+#define SPAN_VARS \ -+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -+#define INIT_PIXEL_PTR(P, X, Y) \ -+ GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4; -+#define INC_PIXEL_PTR(P) P += 4 -+#define STORE_PIXEL(DST, X, Y, VALUE) \ -+ STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) -+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ -+ STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) -+#define FETCH_PIXEL(DST, SRC) \ -+ FETCH_PIXEL_X8R8G8B8(DST, SRC) -+ -+#include "swrast/s_spantemp.h" -+ -+ - /* 16-bit BGR */ - #define NAME(FUNC) FUNC##_R5G6B5 - #define RB_TYPE GLubyte -@@ -210,6 +246,24 @@ static const GLubyte kernel[16] = { - #include "swrast_spantemp.h" - - -+/* 32-bit BGRX */ -+#define NAME(FUNC) FUNC##_X8R8G8B8_front -+#define RB_TYPE GLubyte -+#define SPAN_VARS \ -+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -+#define INIT_PIXEL_PTR(P, X, Y) \ -+ GLubyte *P = (GLubyte *)row; -+#define INC_PIXEL_PTR(P) P += 4 -+#define STORE_PIXEL(DST, X, Y, VALUE) \ -+ STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) -+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ -+ STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) -+#define FETCH_PIXEL(DST, SRC) \ -+ FETCH_PIXEL_X8R8G8B8(DST, SRC) -+ -+#include "swrast_spantemp.h" -+ -+ - /* 16-bit BGR */ - #define NAME(FUNC) FUNC##_R5G6B5_front - #define RB_TYPE GLubyte -@@ -279,6 +333,15 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb, - xrb->Base.PutValues = put_values_A8R8G8B8; - xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8; - break; -+ case PF_X8R8G8B8: -+ xrb->Base.GetRow = get_row_X8R8G8B8; -+ xrb->Base.GetValues = get_values_X8R8G8B8; -+ xrb->Base.PutRow = put_row_X8R8G8B8; -+ xrb->Base.PutRowRGB = put_row_rgb_X8R8G8B8; -+ xrb->Base.PutMonoRow = put_mono_row_X8R8G8B8; -+ xrb->Base.PutValues = put_values_X8R8G8B8; -+ xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8; -+ break; - case PF_R5G6B5: - xrb->Base.GetRow = get_row_R5G6B5; - xrb->Base.GetValues = get_values_R5G6B5; -@@ -334,6 +397,15 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb, - xrb->Base.PutValues = put_values_A8R8G8B8_front; - xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8_front; - break; -+ case PF_X8R8G8B8: -+ xrb->Base.GetRow = get_row_X8R8G8B8_front; -+ xrb->Base.GetValues = get_values_X8R8G8B8_front; -+ xrb->Base.PutRow = put_row_X8R8G8B8_front; -+ xrb->Base.PutRowRGB = put_row_rgb_X8R8G8B8_front; -+ xrb->Base.PutMonoRow = put_mono_row_X8R8G8B8_front; -+ xrb->Base.PutValues = put_values_X8R8G8B8_front; -+ xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8_front; -+ break; - case PF_R5G6B5: - xrb->Base.GetRow = get_row_R5G6B5_front; - xrb->Base.GetValues = get_values_R5G6B5_front; -diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c -index cd22b84..5f2f5cf 100644 ---- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c -+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c -@@ -361,6 +361,7 @@ tdfxFillInModes(__DRIscreenPrivate *psp, - static const GLenum db_modes[2] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML }; - uint8_t depth_bits_array[4]; - uint8_t stencil_bits_array[4]; -+ uint8_t msaa_samples_array[1]; - if(deep) { - depth_bits_array[0] = 0; - depth_bits_array[1] = 24; -@@ -377,13 +378,17 @@ tdfxFillInModes(__DRIscreenPrivate *psp, - stencil_bits_array[3] = 8; - } - -- return driCreateConfigs( -- deep ? GL_RGBA : GL_RGB, -- deep ? GL_UNSIGNED_INT_8_8_8_8 : GL_UNSIGNED_SHORT_5_6_5, -- depth_bits_array, -- stencil_bits_array, -- deep ? 2 : 4, -- db_modes, 2); -+ msaa_samples_array[0] = 0; -+ -+ return (const __DRIconfig **) -+ driCreateConfigs(deep ? GL_RGBA : GL_RGB, -+ deep ? GL_UNSIGNED_INT_8_8_8_8 : -+ GL_UNSIGNED_SHORT_5_6_5, -+ depth_bits_array, -+ stencil_bits_array, -+ deep ? 2 : 4, -+ db_modes, 2, -+ msaa_samples_array, 1); - } - - /** -diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c -index 988f993..e9f5661 100644 ---- a/src/mesa/drivers/dri/unichrome/via_screen.c -+++ b/src/mesa/drivers/dri/unichrome/via_screen.c -@@ -342,6 +342,7 @@ viaFillInModes( __DRIscreenPrivate *psp, - */ - static const uint8_t depth_bits_array[4] = { 0, 16, 24, 32 }; - static const uint8_t stencil_bits_array[4] = { 0, 0, 8, 0 }; -+ uint8_t msaa_samples_array[1] = { 0 }; - const unsigned depth_buffer_factor = 3; - - if ( pixel_bits == 16 ) { -@@ -356,7 +357,8 @@ viaFillInModes( __DRIscreenPrivate *psp, - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, back_buffer_modes, -- back_buffer_factor); -+ back_buffer_factor, -+ msaa_samples_array, 1); - if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, - __LINE__); diff --git a/mesa-7.5-get-driver-name.patch b/mesa-7.5-get-driver-name.patch deleted file mode 100644 index 51dc2a9..0000000 --- a/mesa-7.5-get-driver-name.patch +++ /dev/null @@ -1,85 +0,0 @@ -commit a3c3c1f1437de0186d70de9017a6a8e404ecf482 -Author: Adam Jackson -Date: Tue Apr 14 17:56:29 2009 -0400 - - glx: Make glXGetScreenDriver() work for DRI2 - -diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c -index 3089aa1..87d62ad 100644 ---- a/src/glx/x11/dri_glx.c -+++ b/src/glx/x11/dri_glx.c -@@ -40,6 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - #include "glxclient.h" - #include "glcontextmodes.h" - #include "xf86dri.h" -+#include "dri2.h" - #include "sarea.h" - #include - #include -@@ -75,32 +76,45 @@ struct __GLXDRIcontextPrivateRec { - */ - static Bool driGetDriverName(Display *dpy, int scrNum, char **driverName) - { -- int directCapable; -- Bool b; -- int driverMajor, driverMinor, driverPatch; -+ int directCapable; -+ Bool b; -+ int event, error; -+ int driverMajor, driverMinor, driverPatch; - -- *driverName = NULL; -+ *driverName = NULL; - -- if (!XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &directCapable)) { -- ErrorMessageF("XF86DRIQueryDirectRenderingCapable failed\n"); -- return False; -- } -- if (!directCapable) { -- ErrorMessageF("XF86DRIQueryDirectRenderingCapable returned false\n"); -- return False; -- } -+ if (XF86DRIQueryExtension(dpy, &event, &error)) { /* DRI1 */ -+ if (!XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &directCapable)) { -+ ErrorMessageF("XF86DRIQueryDirectRenderingCapable failed\n"); -+ return False; -+ } -+ if (!directCapable) { -+ ErrorMessageF("XF86DRIQueryDirectRenderingCapable returned false\n"); -+ return False; -+ } - -- b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, -- &driverPatch, driverName); -- if (!b) { -- ErrorMessageF("Cannot determine driver name for screen %d\n", scrNum); -- return False; -- } -+ b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, -+ &driverPatch, driverName); -+ if (!b) { -+ ErrorMessageF("Cannot determine driver name for screen %d\n", scrNum); -+ return False; -+ } -+ -+ InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n", -+ driverMajor, driverMinor, driverPatch, *driverName, scrNum); -+ -+ return True; -+ } else if (DRI2QueryExtension(dpy, &event, &error)) { /* DRI2 */ -+ char *dev; -+ Bool ret = DRI2Connect(dpy, RootWindow(dpy, scrNum), driverName, &dev); - -- InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n", -- driverMajor, driverMinor, driverPatch, *driverName, scrNum); -+ if (ret) -+ Xfree(dev); -+ -+ return ret; -+ } - -- return True; -+ return False; - } - - /* diff --git a/mesa-intel-snb-regression-reverts.patch b/mesa-intel-snb-regression-reverts.patch deleted file mode 100644 index 9b33f62..0000000 --- a/mesa-intel-snb-regression-reverts.patch +++ /dev/null @@ -1,125 +0,0 @@ -diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c -index 32ee37f..21ce92c 100644 ---- a/src/mesa/drivers/dri/i965/brw_eu_emit.c -+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c -@@ -52,35 +52,6 @@ static void guess_execution_size(struct brw_compile *p, - } - - --/** -- * Prior to Sandybridge, the SEND instruction accepted non-MRF source -- * registers, implicitly moving the operand to a message register. -- * -- * On Sandybridge, this is no longer the case. This function performs the -- * explicit move; it should be called before emitting a SEND instruction. -- */ --static void --gen6_resolve_implied_move(struct brw_compile *p, -- struct brw_reg *src, -- GLuint msg_reg_nr) --{ -- struct intel_context *intel = &p->brw->intel; -- if (intel->gen != 6) -- return; -- -- if (src->file == BRW_ARCHITECTURE_REGISTER_FILE && src->nr == BRW_ARF_NULL) -- return; -- -- brw_push_insn_state(p); -- brw_set_mask_control(p, BRW_MASK_DISABLE); -- brw_set_compression_control(p, BRW_COMPRESSION_NONE); -- brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD), -- retype(*src, BRW_REGISTER_TYPE_UD)); -- brw_pop_insn_state(p); -- *src = brw_message_reg(msg_reg_nr); --} -- -- - static void brw_set_dest(struct brw_compile *p, - struct brw_instruction *insn, - struct brw_reg dest) -@@ -1800,7 +1771,6 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p, - GLuint bind_table_index) - { - struct intel_context *intel = &p->brw->intel; -- struct brw_reg src = brw_vec8_grf(0, 0); - int msg_type; - - /* Setup MRF[1] with offset into const buffer */ -@@ -1817,7 +1787,6 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p, - addr_reg, brw_imm_d(offset)); - brw_pop_insn_state(p); - -- gen6_resolve_implied_move(p, &src, 0); - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND); - - insn->header.predicate_control = BRW_PREDICATE_NONE; -@@ -1826,7 +1795,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p, - insn->header.mask_control = BRW_MASK_DISABLE; - - brw_set_dest(p, insn, dest); -- brw_set_src0(insn, src); -+ brw_set_src0(insn, brw_vec8_grf(0, 0)); - - if (intel->gen == 6) - msg_type = GEN6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ; -@@ -1997,7 +1966,20 @@ void brw_SAMPLE(struct brw_compile *p, - { - struct brw_instruction *insn; - -- gen6_resolve_implied_move(p, &src0, msg_reg_nr); -+ /* Sandybridge doesn't have the implied move for SENDs, -+ * and the first message register index comes from src0. -+ */ -+ if (intel->gen >= 6) { -+ if (src0.file != BRW_ARCHITECTURE_REGISTER_FILE || -+ src0.nr != BRW_ARF_NULL) { -+ brw_push_insn_state(p); -+ brw_set_mask_control( p, BRW_MASK_DISABLE ); -+ brw_set_compression_control(p, BRW_COMPRESSION_NONE); -+ brw_MOV(p, retype(brw_message_reg(msg_reg_nr), src0.type), src0); -+ brw_pop_insn_state(p); -+ } -+ src0 = brw_message_reg(msg_reg_nr); -+ } - - insn = next_insn(p, BRW_OPCODE_SEND); - insn->header.predicate_control = 0; /* XXX */ -@@ -2052,7 +2034,17 @@ void brw_urb_WRITE(struct brw_compile *p, - struct intel_context *intel = &p->brw->intel; - struct brw_instruction *insn; - -- gen6_resolve_implied_move(p, &src0, msg_reg_nr); -+ /* Sandybridge doesn't have the implied move for SENDs, -+ * and the first message register index comes from src0. -+ */ -+ if (intel->gen >= 6) { -+ brw_push_insn_state(p); -+ brw_set_mask_control( p, BRW_MASK_DISABLE ); -+ brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD), -+ retype(src0, BRW_REGISTER_TYPE_UD)); -+ brw_pop_insn_state(p); -+ src0 = brw_message_reg(msg_reg_nr); -+ } - - insn = next_insn(p, BRW_OPCODE_SEND); - -@@ -2162,7 +2154,17 @@ void brw_ff_sync(struct brw_compile *p, - struct intel_context *intel = &p->brw->intel; - struct brw_instruction *insn; - -- gen6_resolve_implied_move(p, &src0, msg_reg_nr); -+ /* Sandybridge doesn't have the implied move for SENDs, -+ * and the first message register index comes from src0. -+ */ -+ if (intel->gen >= 6) { -+ brw_push_insn_state(p); -+ brw_set_mask_control( p, BRW_MASK_DISABLE ); -+ brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD), -+ retype(src0, BRW_REGISTER_TYPE_UD)); -+ brw_pop_insn_state(p); -+ src0 = brw_message_reg(msg_reg_nr); -+ } - - insn = next_insn(p, BRW_OPCODE_SEND); - brw_set_dest(p, insn, dest); From c0d2da06582dc2581f8b3e5a0449abdd0a577f98 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 9 May 2011 15:39:01 -0400 Subject: [PATCH 02/12] use llvm's libllvm.so hack instead of our own --- mesa-7.10-llvmcore.patch | 49 ++++------------------------------------ mesa.spec | 42 +++++----------------------------- 2 files changed, 11 insertions(+), 80 deletions(-) diff --git a/mesa-7.10-llvmcore.patch b/mesa-7.10-llvmcore.patch index cdbeea5..853a0b4 100644 --- a/mesa-7.10-llvmcore.patch +++ b/mesa-7.10-llvmcore.patch @@ -1,51 +1,12 @@ -diff --git a/configs/autoconf.in b/configs/autoconf.in -index 4e931a3..fec8e42 100644 ---- a/configs/autoconf.in -+++ b/configs/autoconf.in -@@ -31,8 +31,8 @@ INTEL_CFLAGS = @INTEL_CFLAGS@ - X11_LIBS = @X11_LIBS@ - X11_CFLAGS = @X11_CFLAGS@ - LLVM_CFLAGS = @LLVM_CFLAGS@ --LLVM_LDFLAGS = @LLVM_LDFLAGS@ --LLVM_LIBS = @LLVM_LIBS@ -+LLVM_LDFLAGS = -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lllvmcore-$(shell llvm-config --version) -+LLVM_LIBS = -lllvmcore-$(shell llvm-config --version) - GLW_CFLAGS = @GLW_CFLAGS@ - GLUT_CFLAGS = @GLUT_CFLAGS@ - GLX_TLS = @GLX_TLS@ -diff --git a/configs/linux-llvm b/configs/linux-llvm -index 359bee2..0de094d 100644 ---- a/configs/linux-llvm -+++ b/configs/linux-llvm -@@ -32,8 +32,8 @@ endif - ifeq ($(MESA_LLVM),1) - LLVM_CFLAGS=`llvm-config --cppflags` - LLVM_CXXFLAGS=`llvm-config --cxxflags` -Wno-long-long -- LLVM_LDFLAGS = $(shell llvm-config --ldflags) -- LLVM_LIBS = $(shell llvm-config --libs) -+ LLVM_LDFLAGS = -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lllvmcore-$(shell llvm-config --version) -+ LLVM_LIBS = -lllvmcore-$(shell llvm-config --version) - MKLIB_OPTIONS=-cplusplus - else - LLVM_CFLAGS= -diff --git a/configure.ac b/configure.ac -index b510151..e872f2e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1404,8 +1404,6 @@ if test "x$enable_gallium" = xyes; then - fi - - AC_SUBST([LLVM_CFLAGS]) --AC_SUBST([LLVM_LIBS]) --AC_SUBST([LLVM_LDFLAGS]) - AC_SUBST([LLVM_VERSION]) - - dnl -@@ -1649,7 +1647,6 @@ if test "x$enable_gallium_llvm" = xyes; then +diff -up mesa-20110412/configure.ac.jx mesa-20110412/configure.ac +--- mesa-20110412/configure.ac.jx 2011-05-09 15:04:19.000000000 -0400 ++++ mesa-20110412/configure.ac 2011-05-09 15:05:11.000000000 -0400 +@@ -1679,7 +1679,7 @@ if test "x$enable_gallium_llvm" = xyes; if test "x$LLVM_CONFIG" != xno; then LLVM_VERSION=`$LLVM_CONFIG --version` LLVM_CFLAGS=`$LLVM_CONFIG --cppflags` - LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++" ++ LLVM_LIBS="-lLLVM-`llvm-config --version` -lstdc++" LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe" diff --git a/mesa.spec b/mesa.spec index f10a8a9..24b23e1 100644 --- a/mesa.spec +++ b/mesa.spec @@ -6,9 +6,6 @@ %define with_hardware 1 %endif -# broken atm, sorry. fix before any f15 merge. -%define with_llvmcore 1 - %define _default_patch_fuzz 2 %define manpages gl-manpages-1.0.1 @@ -18,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.7.%{gitdate}.0%{?dist} +Release: 0.8.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -29,7 +26,6 @@ URL: http://www.mesa3d.org Source0: %{name}-%{gitdate}.tar.xz Source2: %{manpages}.tar.bz2 Source3: make-git-snapshot.sh -Source4: llvmcore.mk Patch1: mesa-nouveau-fix-build.patch Patch2: mesa-7.1-nukeglthread-debug.patch @@ -111,22 +107,12 @@ Group: User Interface/X Hardware Support %description dri-filesystem Mesa DRI driver filesystem -%if %{with_llvmcore} -%package dri-llvmcore -Summary: Mesa common LLVM support -Group: User Interface/X Hardware Support -Requires: mesa-dri-filesystem%{?_isa} -%description dri-llvmcore -Common DSO for LLVM support for gallium-based DRI drivers. This package -exists solely as a disk space hack for Mesa. Do not link against this -library if you are not Mesa. You have been warned. -%endif - %package dri-drivers Summary: Mesa-based DRI drivers Group: User Interface/X Hardware Support Requires: mesa-dri-filesystem%{?_isa} Obsoletes: mesa-dri-drivers-experimental < 0:7.10-0.24 +Obsoletes: mesa-dri-llvmcore <= 7.11-0.8 %description dri-drivers Mesa-based DRI drivers. @@ -220,13 +206,10 @@ Requires: Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires vide %patch3 -p1 -b .no-mach64 %patch4 -p1 -b .classic #patch7 -p1 -b .dricore +%patch8 -p1 -b .llvmcore %patch30 -p1 -b .vblank-warning #patch31 -p1 -b .swrastg -%if %{with_llvmcore} -%patch8 -p1 -b .llvmcore -%endif - %build autoreconf --install @@ -251,13 +234,6 @@ make clean # just to be sure... [ `find . -name \*.o | wc -l` -eq 0 ] || exit 1 -# build llvmcore -%if %{with_llvmcore} -TOP=`pwd` make -f %{SOURCE4} llvmcore -mkdir -p %{_lib} -mv libllvmcore*.so %{_lib} -%endif - # now build the rest of mesa %configure %{common_flags} \ --disable-glw \ @@ -301,9 +277,6 @@ make install DESTDIR=$RPM_BUILD_ROOT DRI_DIRS= # just the DRI drivers that are sane install -d $RPM_BUILD_ROOT%{_libdir}/dri -%if %{with_llvmcore} -install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libllvmcore-2*.so >& /dev/null -%endif # use gallium driver iff built [ -f %{_lib}/gallium/r300_dri.so ] && cp %{_lib}/gallium/r300_dri.so %{_lib}/r300_dri.so [ -f %{_lib}/gallium/r600_dri.so ] && cp %{_lib}/gallium/r600_dri.so %{_lib}/r600_dri.so @@ -381,12 +354,6 @@ rm -rf $RPM_BUILD_ROOT %doc docs/COPYING %dir %{_libdir}/dri -%if %{with_llvmcore} -%files dri-llvmcore -%defattr(-,root,root,-) -%{_libdir}/dri/libllvmcore-2.*.so -%endif - %files dri-drivers %defattr(-,root,root,-) %if %{with_hardware} @@ -488,6 +455,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libOSMesa.so %changelog +* Mon May 09 2011 Adam Jackson 7.11-0.8.20110412.0 +- Use llvm-libs' shared lib instead of rolling our own. + * Mon Apr 18 2011 Adam Jackson 7.11-0.7.20110412.0 - Fix intel driver exclusion to be better arched (#697555) From bfe01be60a047b5a3090cd859f61592b54a6fc55 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 9 May 2011 19:37:05 -0400 Subject: [PATCH 03/12] death to DRI1 drivers --- mesa.spec | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/mesa.spec b/mesa.spec index 24b23e1..c878d1d 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.8.%{gitdate}.0%{?dist} +Release: 0.9.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -112,17 +112,11 @@ Summary: Mesa-based DRI drivers Group: User Interface/X Hardware Support Requires: mesa-dri-filesystem%{?_isa} Obsoletes: mesa-dri-drivers-experimental < 0:7.10-0.24 -Obsoletes: mesa-dri-llvmcore <= 7.11-0.8 +Obsoletes: mesa-dri-llvmcore <= %{version}-%{release} +Obsoletes: mesa-dri-drivers-dri1 <= %{version}-%{release} %description dri-drivers Mesa-based DRI drivers. -%package dri-drivers-dri1 -Summary: Mesa-based DRI1 drivers -Group: User Interface/X Hardware Support -Requires: mesa-dri-filesystem%{?isa} -%description dri-drivers-dri1 -Mesa-based DRI1 drivers. - %package libGL-devel Summary: Mesa libGL development package Group: Development/Libraries @@ -241,6 +235,7 @@ make clean --disable-gl-osmesa \ --with-driver=dri \ --with-dri-driverdir=%{_libdir}/dri \ + --with-dri-drivers=i915,i965 \ --with-state-trackers=dri,glx \ --enable-egl \ --enable-gles1 \ @@ -280,9 +275,9 @@ install -d $RPM_BUILD_ROOT%{_libdir}/dri # use gallium driver iff built [ -f %{_lib}/gallium/r300_dri.so ] && cp %{_lib}/gallium/r300_dri.so %{_lib}/r300_dri.so [ -f %{_lib}/gallium/r600_dri.so ] && cp %{_lib}/gallium/r600_dri.so %{_lib}/r600_dri.so -[ -f %{_lib}/gallium/swrastg_dri.so ] && mv %{_lib}/gallium/swrastg_dri.so %{_lib}/swrast_dri.so +[ -f %{_lib}/gallium/swrastg_dri.so ] && cp %{_lib}/gallium/swrastg_dri.so %{_lib}/swrastg_dri.so -for f in i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon savage sis swrast tdfx unichrome nouveau_vieux gallium/vmwgfx ; do +for f in i915 i965 gallium/vmwgfx ; do so=%{_lib}/${f}_dri.so test -e $so && echo $so done | xargs install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri >& /dev/null || : @@ -357,8 +352,6 @@ rm -rf $RPM_BUILD_ROOT %files dri-drivers %defattr(-,root,root,-) %if %{with_hardware} -%{_libdir}/dri/radeon_dri.so -%{_libdir}/dri/r200_dri.so %{_libdir}/dri/r300_dri.so %{_libdir}/dri/r600_dri.so %ifarch %{ix86} x86_64 ia64 @@ -368,28 +361,8 @@ rm -rf $RPM_BUILD_ROOT %endif %endif %{_libdir}/dri/nouveau_dri.so -%{_libdir}/dri/nouveau_vieux_dri.so -%endif -%{_libdir}/dri/swrast_dri.so -%exclude %{_libdir}/dri/swrastg_dri.so - -%files dri-drivers-dri1 -%defattr(-,root,root,-) -%doc docs/COPYING -%if %{with_hardware} -%ifarch %{ix86} -%{_libdir}/dri/i810_dri.so -%{_libdir}/dri/sis_dri.so -%endif -%{_libdir}/dri/r128_dri.so -%ifnarch %{sparc} -# we no much hardware.... -%{_libdir}/dri/mga_dri.so -%{_libdir}/dri/savage_dri.so -%{_libdir}/dri/tdfx_dri.so -%{_libdir}/dri/unichrome_dri.so -%endif %endif +%{_libdir}/dri/swrastg_dri.so %files libGL-devel %defattr(-,root,root,-) @@ -455,6 +428,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libOSMesa.so %changelog +* Mon May 09 2011 Adam Jackson 7.11-0.9.20110412.0 +- Drop dri1 subpackage (and its drivers), use "swrastg" consistently. + * Mon May 09 2011 Adam Jackson 7.11-0.8.20110412.0 - Use llvm-libs' shared lib instead of rolling our own. From b65713229cc6988c95ab7912e889126174659e65 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 9 May 2011 20:17:06 -0400 Subject: [PATCH 04/12] single build pass --- mesa.spec | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/mesa.spec b/mesa.spec index c878d1d..c441511 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.9.%{gitdate}.0%{?dist} +Release: 0.10.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -216,24 +216,13 @@ export CXXFLAGS="$RPM_OPT_FLAGS" %else %define common_flags --enable-selinux --enable-pic --enable-udev %endif -%define osmesa_flags --with-driver=osmesa %{common_flags} --disable-gallium --with-dri-drivers="" --disable-glu --disable-egl -# first, build osmesa. - -%configure %{osmesa_flags} --with-osmesa-bits=8 -make %{_smp_mflags} -mv %{_lib} osmesa8 -make clean - -# just to be sure... -[ `find . -name \*.o | wc -l` -eq 0 ] || exit 1 - -# now build the rest of mesa %configure %{common_flags} \ --disable-glw \ --disable-glut \ - --disable-gl-osmesa \ + --enable-gl-osmesa \ --with-driver=dri \ + --with-osmesa-bits=8 \ --with-dri-driverdir=%{_libdir}/dri \ --with-dri-drivers=i915,i965 \ --with-state-trackers=dri,glx \ @@ -291,9 +280,6 @@ pushd $RPM_BUILD_ROOT%{_libdir} rm -f xorg/modules/drivers/modesetting_drv.so popd -# and osmesa -mv osmesa*/libOS* $RPM_BUILD_ROOT%{_libdir} - # man pages pushd ../%{manpages} make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT @@ -426,8 +412,12 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %{_includedir}/GL/osmesa.h %{_libdir}/libOSMesa.so +%{_libdir}/pkgconfig/osmesa.pc %changelog +* Mon May 09 2011 Adam Jackson 7.11-0.10.20110412.0 +- Drop the separate build pass for osmesa, no longer needed. + * Mon May 09 2011 Adam Jackson 7.11-0.9.20110412.0 - Drop dri1 subpackage (and its drivers), use "swrastg" consistently. From d48bd270ddebe0eab280016c03fe8d61dbade4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 10 May 2011 12:18:22 +0200 Subject: [PATCH 05/12] r300 needs to be explicitely disabled when with_hardware == 0 --- mesa.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mesa.spec b/mesa.spec index c441511..c64d7ea 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.10.%{gitdate}.0%{?dist} +Release: 0.11.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -235,11 +235,13 @@ export CXXFLAGS="$RPM_OPT_FLAGS" %if %{with_hardware} --enable-gallium-llvm \ --enable-gallium-radeon \ + --enable-gallium-r300 \ --enable-gallium-r600 \ --enable-gallium-nouveau \ %else --disable-gallium-llvm \ --disable-gallium-radeon \ + --disable-gallium-r300 \ --disable-gallium-r600 \ --disable-gallium-nouveau \ %endif @@ -415,6 +417,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Tue May 10 2011 Dan Horák 7.11-0.11.20110412.0 +- r300 needs to be explicitely disabled when with_hardware == 0 + * Mon May 09 2011 Adam Jackson 7.11-0.10.20110412.0 - Drop the separate build pass for osmesa, no longer needed. From 15630b359e8fe7ae03c4e5d8e2a7dc5c001e4bfd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Jun 2011 13:47:11 +1000 Subject: [PATCH 06/12] dropping DRI1 is premature, fix swrastg upstream first. --- mesa.spec | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/mesa.spec b/mesa.spec index c64d7ea..c1805ad 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.11.%{gitdate}.0%{?dist} +Release: 0.12.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -112,11 +112,17 @@ Summary: Mesa-based DRI drivers Group: User Interface/X Hardware Support Requires: mesa-dri-filesystem%{?_isa} Obsoletes: mesa-dri-drivers-experimental < 0:7.10-0.24 -Obsoletes: mesa-dri-llvmcore <= %{version}-%{release} -Obsoletes: mesa-dri-drivers-dri1 <= %{version}-%{release} +Obsoletes: mesa-dri-llvmcore <= 7.11-0.8 %description dri-drivers Mesa-based DRI drivers. +%package dri-drivers-dri1 +Summary: Mesa-based DRI1 drivers +Group: User Interface/X Hardware Support +Requires: mesa-dri-filesystem%{?isa} +%description dri-drivers-dri1 +Mesa-based DRI1 drivers. + %package libGL-devel Summary: Mesa libGL development package Group: Development/Libraries @@ -224,7 +230,6 @@ export CXXFLAGS="$RPM_OPT_FLAGS" --with-driver=dri \ --with-osmesa-bits=8 \ --with-dri-driverdir=%{_libdir}/dri \ - --with-dri-drivers=i915,i965 \ --with-state-trackers=dri,glx \ --enable-egl \ --enable-gles1 \ @@ -266,9 +271,9 @@ install -d $RPM_BUILD_ROOT%{_libdir}/dri # use gallium driver iff built [ -f %{_lib}/gallium/r300_dri.so ] && cp %{_lib}/gallium/r300_dri.so %{_lib}/r300_dri.so [ -f %{_lib}/gallium/r600_dri.so ] && cp %{_lib}/gallium/r600_dri.so %{_lib}/r600_dri.so -[ -f %{_lib}/gallium/swrastg_dri.so ] && cp %{_lib}/gallium/swrastg_dri.so %{_lib}/swrastg_dri.so +[ -f %{_lib}/gallium/swrastg_dri.so ] && mv %{_lib}/gallium/swrastg_dri.so %{_lib}/swrast_dri.so -for f in i915 i965 gallium/vmwgfx ; do +for f in i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon savage sis swrast tdfx unichrome nouveau_vieux gallium/vmwgfx ; do so=%{_lib}/${f}_dri.so test -e $so && echo $so done | xargs install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri >& /dev/null || : @@ -340,6 +345,8 @@ rm -rf $RPM_BUILD_ROOT %files dri-drivers %defattr(-,root,root,-) %if %{with_hardware} +%{_libdir}/dri/radeon_dri.so +%{_libdir}/dri/r200_dri.so %{_libdir}/dri/r300_dri.so %{_libdir}/dri/r600_dri.so %ifarch %{ix86} x86_64 ia64 @@ -349,8 +356,28 @@ rm -rf $RPM_BUILD_ROOT %endif %endif %{_libdir}/dri/nouveau_dri.so +%{_libdir}/dri/nouveau_vieux_dri.so +%endif +%{_libdir}/dri/swrast_dri.so +%exclude %{_libdir}/dri/swrastg_dri.so + +%files dri-drivers-dri1 +%defattr(-,root,root,-) +%doc docs/COPYING +%if %{with_hardware} +%ifarch %{ix86} +%{_libdir}/dri/i810_dri.so +%{_libdir}/dri/sis_dri.so +%endif +%{_libdir}/dri/r128_dri.so +%ifnarch %{sparc} +# we no much hardware.... +%{_libdir}/dri/mga_dri.so +%{_libdir}/dri/savage_dri.so +%{_libdir}/dri/tdfx_dri.so +%{_libdir}/dri/unichrome_dri.so +%endif %endif -%{_libdir}/dri/swrastg_dri.so %files libGL-devel %defattr(-,root,root,-) @@ -417,6 +444,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Mon Jun 20 2011 Dave Airlie 7.11-0.12.20110412.0 +- dropping DRI1 is premature, fix swrastg upstream first. + * Tue May 10 2011 Dan Horák 7.11-0.11.20110412.0 - r300 needs to be explicitely disabled when with_hardware == 0 From d82d9c8abb78a6eedd2e26c4f6a23b66e479e66b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Jun 2011 14:15:34 +1000 Subject: [PATCH 07/12] rebase to 20 June snapshot from upstream - new gallium config options --- .gitignore | 1 + legacy-drivers.patch | 20 ++++++++++---------- mesa-7.1-nukeglthread-debug.patch | 16 ++++++++-------- mesa-no-mach64.patch | 30 +++++++++++++++--------------- mesa.spec | 26 +++++++++----------------- sources | 1 + 6 files changed, 44 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index eae88d1..5ce3144 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ mesa-20100720.tar.bz2 /mesa-20110330.tar.xz /mesa-20110401.tar.xz /mesa-20110412.tar.xz +/mesa-20110620.tar.xz diff --git a/legacy-drivers.patch b/legacy-drivers.patch index 3b99a79..e9b964b 100644 --- a/legacy-drivers.patch +++ b/legacy-drivers.patch @@ -1,12 +1,12 @@ -diff -up mesa-20100529/configure.ac.nouveau mesa-20100529/configure.ac ---- mesa-20100529/configure.ac.nouveau 2010-05-29 18:57:30.000000000 +1000 -+++ mesa-20100529/configure.ac 2010-05-29 18:58:24.000000000 +1000 -@@ -820,20 +820,20 @@ if test "$mesa_driver" = dri; then +diff -up mesa-20110620/configure.ac.classic mesa-20110620/configure.ac +--- mesa-20110620/configure.ac.classic 2011-06-20 13:52:52.000000000 +1000 ++++ mesa-20110620/configure.ac 2011-06-20 13:55:09.000000000 +1000 +@@ -1023,20 +1023,20 @@ if test "$mesa_driver" = dri -o "$mesa_d # x86-64 system where they could *ever* be used. if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i915 i965 mga r128 r200 r300 r600 radeon \ -- savage tdfx unichrome swrast" -+ savage tdfx unichrome nouveau" + DRI_DIRS="i915 i965 mga nouveau r128 r200 r300 r600 \ +- radeon savage tdfx unichrome swrast" ++ radeon savage tdfx unichrome" fi ;; powerpc*) @@ -25,12 +25,12 @@ diff -up mesa-20100529/configure.ac.nouveau mesa-20100529/configure.ac fi ;; esac -@@ -870,7 +870,7 @@ if test "$mesa_driver" = dri; then +@@ -1080,7 +1080,7 @@ if test "$mesa_driver" = dri -o "$mesa_d # default drivers if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i810 i915 i965 mga r128 r200 r300 r600 radeon \ + DRI_DIRS="i810 i915 i965 mga nouveau r128 r200 r300 r600 radeon \ - savage sis tdfx unichrome swrast" -+ savage sis tdfx unichrome nouveau" ++ savage sis tdfx unichrome" fi DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` diff --git a/mesa-7.1-nukeglthread-debug.patch b/mesa-7.1-nukeglthread-debug.patch index 642e505..a55ea31 100644 --- a/mesa-7.1-nukeglthread-debug.patch +++ b/mesa-7.1-nukeglthread-debug.patch @@ -1,15 +1,15 @@ -diff -up mesa-20100529/src/mesa/drivers/dri/intel/intel_fbo.c.dave mesa-20100529/src/mesa/drivers/dri/intel/intel_fbo.c ---- mesa-20100529/src/mesa/drivers/dri/intel/intel_fbo.c.dave 2010-05-30 18:24:35.000000000 +1000 -+++ mesa-20100529/src/mesa/drivers/dri/intel/intel_fbo.c 2010-05-30 18:24:42.000000000 +1000 -@@ -558,11 +558,6 @@ intel_render_texture(GLcontext * ctx, +diff -up mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c.da mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c +--- mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c.da 2011-06-20 13:51:25.000000000 +1000 ++++ mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c 2011-06-20 13:51:32.000000000 +1000 +@@ -612,11 +612,6 @@ intel_render_texture(struct gl_context * return; } - DBG("Begin render texture tid %lx tex=%u w=%d h=%d refcount=%d\n", - _glthread_GetID(), -- att->Texture->Name, newImage->Width, newImage->Height, +- att->Texture->Name, image->Width, image->Height, - irb->Base.RefCount); - - /* point the renderbufer's region to the texture image region */ - if (irb->region != intel_image->mt->region) { - if (irb->region) + intel_renderbuffer_set_draw_offset(irb, intel_image, att->Zoffset); + intel_image->used_as_render_target = GL_TRUE; + diff --git a/mesa-no-mach64.patch b/mesa-no-mach64.patch index 7c8d48a..a1a91cd 100644 --- a/mesa-no-mach64.patch +++ b/mesa-no-mach64.patch @@ -1,16 +1,16 @@ -diff -up mesa-20100529/configure.ac.mach64 mesa-20100529/configure.ac ---- mesa-20100529/configure.ac.mach64 2010-05-29 11:31:22.000000000 +1000 -+++ mesa-20100529/configure.ac 2010-05-29 18:53:55.000000000 +1000 -@@ -819,7 +819,7 @@ if test "$mesa_driver" = dri; then +diff -up mesa-20110620/configure.ac.no-mach64 mesa-20110620/configure.ac +--- mesa-20110620/configure.ac.no-mach64 2011-06-20 12:19:16.000000000 +1000 ++++ mesa-20110620/configure.ac 2011-06-20 13:52:27.000000000 +1000 +@@ -1022,7 +1022,7 @@ if test "$mesa_driver" = dri -o "$mesa_d # the new interface. i810 are missing because there is no # x86-64 system where they could *ever* be used. if test "x$DRI_DIRS" = "xyes"; then -- DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ -+ DRI_DIRS="i915 i965 mga r128 r200 r300 r600 radeon \ - savage tdfx unichrome swrast" +- DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \ ++ DRI_DIRS="i915 i965 mga nouveau r128 r200 r300 r600 \ + radeon savage tdfx unichrome swrast" fi ;; -@@ -827,13 +827,13 @@ if test "$mesa_driver" = dri; then +@@ -1030,13 +1030,13 @@ if test "$mesa_driver" = dri -o "$mesa_d # Build only the drivers for cards that exist on PowerPC. # At some point MGA will be added, but not yet. if test "x$DRI_DIRS" = "xyes"; then @@ -26,21 +26,21 @@ diff -up mesa-20100529/configure.ac.mach64 mesa-20100529/configure.ac fi ;; esac -@@ -850,7 +850,7 @@ if test "$mesa_driver" = dri; then +@@ -1050,7 +1050,7 @@ if test "$mesa_driver" = dri -o "$mesa_d fi if test "x$DRI_DIRS" = "xyes"; then -- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ -+ DRI_DIRS="i810 i915 i965 mga r128 r200 r300 r600 radeon tdfx \ - unichrome savage sis swrast" +- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \ ++ DRI_DIRS="i810 i915 i965 mga nouveau r128 r200 r300 r600 \ + radeon tdfx unichrome savage sis swrast" fi ;; -@@ -869,7 +869,7 @@ if test "$mesa_driver" = dri; then +@@ -1079,7 +1079,7 @@ if test "$mesa_driver" = dri -o "$mesa_d # default drivers if test "x$DRI_DIRS" = "xyes"; then -- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ -+ DRI_DIRS="i810 i915 i965 mga r128 r200 r300 r600 radeon \ +- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \ ++ DRI_DIRS="i810 i915 i965 mga nouveau r128 r200 r300 r600 radeon \ savage sis tdfx unichrome swrast" fi diff --git a/mesa.spec b/mesa.spec index c1805ad..97dfda2 100644 --- a/mesa.spec +++ b/mesa.spec @@ -9,13 +9,13 @@ %define _default_patch_fuzz 2 %define manpages gl-manpages-1.0.1 -%define gitdate 20110412 +%define gitdate 20110620 #% define snapshot Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.12.%{gitdate}.0%{?dist} +Release: 0.13.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -27,7 +27,6 @@ Source0: %{name}-%{gitdate}.tar.xz Source2: %{manpages}.tar.bz2 Source3: make-git-snapshot.sh -Patch1: mesa-nouveau-fix-build.patch Patch2: mesa-7.1-nukeglthread-debug.patch Patch3: mesa-no-mach64.patch Patch4: legacy-drivers.patch @@ -201,7 +200,6 @@ Requires: Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires vide %prep #setup -q -n Mesa-%{version}%{?snapshot} -b0 -b2 %setup -q -n mesa-%{gitdate} -b2 -%patch1 -p1 -b .nv-fix %patch2 -p1 -b .intel-glthread %patch3 -p1 -b .no-mach64 %patch4 -p1 -b .classic @@ -218,9 +216,9 @@ export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" %ifarch %{ix86} # i do not have words for how much the assembly dispatch code infuriates me -%define common_flags --enable-selinux --enable-pic --enable-udev --disable-asm +%define common_flags --enable-selinux --enable-pic --disable-asm %else -%define common_flags --enable-selinux --enable-pic --enable-udev +%define common_flags --enable-selinux --enable-pic %endif %configure %{common_flags} \ @@ -230,25 +228,16 @@ export CXXFLAGS="$RPM_OPT_FLAGS" --with-driver=dri \ --with-osmesa-bits=8 \ --with-dri-driverdir=%{_libdir}/dri \ - --with-state-trackers=dri,glx \ --enable-egl \ --enable-gles1 \ --enable-gles2 \ - --disable-gallium-intel \ - --disable-gallium-svga \ --disable-gallium-egl \ %if %{with_hardware} + --with-gallium-drivers=r300,r600,nouveau,swrast \ --enable-gallium-llvm \ - --enable-gallium-radeon \ - --enable-gallium-r300 \ - --enable-gallium-r600 \ - --enable-gallium-nouveau \ %else --disable-gallium-llvm \ - --disable-gallium-radeon \ - --disable-gallium-r300 \ - --disable-gallium-r600 \ - --disable-gallium-nouveau \ + --with-gallium-drivers=swrast \ %endif %{?dri_drivers} @@ -444,6 +433,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Mon Jun 20 2011 Dave Airlie 7.11-0.13.20110620.0 +- rebase to 20 June snapshot from upstream - new gallium config options + * Mon Jun 20 2011 Dave Airlie 7.11-0.12.20110412.0 - dropping DRI1 is premature, fix swrastg upstream first. diff --git a/sources b/sources index ccfda6e..1155337 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2 b8a15e6f9892d004c3407d6a0659fb5b mesa-20110412.tar.xz +ee6c00d4c596e4a9dee0cb9599054b81 mesa-20110620.tar.xz From 49805aa616c35dfe6b7ef3a7e8a69d57639ec0e3 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 5 Jul 2011 16:28:52 -0400 Subject: [PATCH 08/12] fix arch deps and directory ownership --- mesa.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mesa.spec b/mesa.spec index 97dfda2..b6f9215 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.13.%{gitdate}.0%{?dist} +Release: 0.14.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -70,7 +70,7 @@ Group: System Environment/Libraries Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Provides: libGL -Requires: libdrm >= 2.4.23-1 +Requires: libdrm%{?isa} >= 2.4.23-1 %if %{with_hardware} Conflicts: xorg-x11-server-Xorg < 1.4.99.901-14 %endif @@ -84,7 +84,7 @@ Group: System Environment/Libraries Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: mesa-dri-drivers%{?_isa} = %{version}-%{release} -Requires: libdrm >= 2.4.23-1 +Requires: libdrm%{?isa} >= 2.4.23-1 %description libEGL Mesa libEGL runtime libraries @@ -95,7 +95,7 @@ Group: System Environment/Libraries Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: mesa-dri-drivers%{?_isa} = %{version}-%{release} -Requires: libdrm >= 2.4.23-1 +Requires: libdrm%{?isa} >= 2.4.23-1 %description libGLES Mesa GLES runtime libraries @@ -386,6 +386,7 @@ rm -rf $RPM_BUILD_ROOT %files libEGL-devel %defattr(-,root,root,-) +%dir %{_includedir}/EGL %{_includedir}/EGL/eglext.h %{_includedir}/EGL/egl.h %{_includedir}/EGL/eglplatform.h @@ -395,10 +396,12 @@ rm -rf $RPM_BUILD_ROOT %files libGLES-devel %defattr(-,root,root,-) +%dir %{_includedir}/GLES %{_includedir}/GLES/egl.h %{_includedir}/GLES/gl.h %{_includedir}/GLES/glext.h %{_includedir}/GLES/glplatform.h +%dir %{_includedir}/GLES2 %{_includedir}/GLES2/gl2platform.h %{_includedir}/GLES2/gl2.h %{_includedir}/GLES2/gl2ext.h @@ -433,6 +436,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Tue Jul 05 2011 Adam Jackson 7.11-0.14.20110620.0 +- Arch-dep and file ownership fixes (#682357) + * Mon Jun 20 2011 Dave Airlie 7.11-0.13.20110620.0 - rebase to 20 June snapshot from upstream - new gallium config options From 7530e4cd03082500df6736539ca1694d74c66b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 6 Jul 2011 23:47:18 +0300 Subject: [PATCH 09/12] More include dir ownership fixes (#682357). --- mesa.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mesa.spec b/mesa.spec index b6f9215..0df5b5e 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.14.%{gitdate}.0%{?dist} +Release: 0.15.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -390,6 +390,7 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/EGL/eglext.h %{_includedir}/EGL/egl.h %{_includedir}/EGL/eglplatform.h +%dir %{_includedir}/KHR %{_includedir}/KHR/khrplatform.h %{_libdir}/pkgconfig/egl.pc %{_libdir}/libEGL.so @@ -431,11 +432,15 @@ rm -rf $RPM_BUILD_ROOT %files libOSMesa-devel %defattr(-,root,root,-) +%dir %{_includedir}/GL %{_includedir}/GL/osmesa.h %{_libdir}/libOSMesa.so %{_libdir}/pkgconfig/osmesa.pc %changelog +* Wed Jul 6 2011 Ville Skyttä - 7.11-0.15.20110620.0 +- More include dir ownership fixes (#682357). + * Tue Jul 05 2011 Adam Jackson 7.11-0.14.20110620.0 - Arch-dep and file ownership fixes (#682357) From f95befaea648f8e7e65f9990b88784e8e03a766b Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 7 Jul 2011 12:21:45 +0400 Subject: [PATCH 10/12] Fix build on PPC/PPC64 Signed-off-by: Peter Lemenkov --- llvmcore.mk | 6 --- make-demo-snapshot.sh | 22 -------- mesa-7.1-link-shared.patch | 101 ----------------------------------- mesa-nouveau-fix-build.patch | 96 --------------------------------- mesa.spec | 9 +++- sources | 1 - 6 files changed, 7 insertions(+), 228 deletions(-) delete mode 100644 llvmcore.mk delete mode 100755 make-demo-snapshot.sh delete mode 100644 mesa-7.1-link-shared.patch delete mode 100644 mesa-nouveau-fix-build.patch diff --git a/llvmcore.mk b/llvmcore.mk deleted file mode 100644 index fe0bb97..0000000 --- a/llvmcore.mk +++ /dev/null @@ -1,6 +0,0 @@ -# Mom, Dad, if you're reading this, I'm very sorry. - -include configs/linux-llvm.llvmcore - -llvmcore: - g++ -fPIC -shared -o libllvmcore-$(shell llvm-config --version).so -Wl,--whole-archive $(shell llvm-config --ldflags) $(LLVM_LIBS) -Wl,--no-whole-archive diff --git a/make-demo-snapshot.sh b/make-demo-snapshot.sh deleted file mode 100755 index 8a50e44..0000000 --- a/make-demo-snapshot.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Usage: ./make-git-snapshot.sh [COMMIT] -# -# to make a snapshot of the given tag/branch. Defaults to HEAD. -# Point env var REF to a local mesa repo to reduce clone time. - -DIRNAME=mesa-demos-$( date +%Y%m%d ) - -echo REF ${REF:+--reference $REF} -echo DIRNAME $DIRNAME -echo HEAD ${1:-HEAD} - -rm -rf $DIRNAME - -git clone ${REF:+--reference $REF} \ - git://git.freedesktop.org/git/mesa/demos $DIRNAME - -GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \ - | bzip2 > $DIRNAME.tar.bz2 - -# rm -rf $DIRNAME diff --git a/mesa-7.1-link-shared.patch b/mesa-7.1-link-shared.patch deleted file mode 100644 index 592e2e2..0000000 --- a/mesa-7.1-link-shared.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.da mesa-20091221/src/mesa/drivers/dri/Makefile ---- mesa-20091221/src/mesa/drivers/dri/Makefile.da 2009-12-21 08:09:11.000000000 +1000 -+++ mesa-20091221/src/mesa/drivers/dri/Makefile 2009-12-21 08:43:03.000000000 +1000 -@@ -6,12 +6,17 @@ include $(TOP)/configs/current - - - --default: $(TOP)/$(LIB_DIR) subdirs dri.pc -+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs dri.pc - - - $(TOP)/$(LIB_DIR): - -mkdir $(TOP)/$(LIB_DIR) - -+libdricore.so: -+ gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive -lm -lpthread -lc -+ -+$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so -+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR) - - subdirs: - @for dir in $(DRI_DIRS) ; do \ -@@ -32,12 +37,14 @@ dri.pc: dri.pc.in - $(pcedit) $< > $@ - - --install: dri.pc -+install: dri.pc $(TOP)/$(LIB_DIR)/libdricore.so - @for dir in $(DRI_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) install) || exit 1 ; \ - fi \ - done -+ $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) -+ $(INSTALL) -m 755 $(TOP)/$(LIB_DIR)/libdricore.so $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) - $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal - $(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \ - $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal -@@ -51,5 +58,6 @@ clean: - (cd $$dir && $(MAKE) clean) ; \ - fi \ - done -+ -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so - -rm -f common/*.o - -rm -f *.pc -diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.template.da mesa-20091221/src/mesa/drivers/dri/Makefile.template ---- mesa-20091221/src/mesa/drivers/dri/Makefile.template.da 2009-12-21 08:09:11.000000000 +1000 -+++ mesa-20091221/src/mesa/drivers/dri/Makefile.template 2009-12-21 08:43:40.000000000 +1000 -@@ -1,6 +1,6 @@ - # -*-makefile-*- - --MESA_MODULES = $(TOP)/src/mesa/libmesa.a -+MESA_MODULES = $(TOP)/$(LIB_DIR)/libdricore.so - - COMMON_GALLIUM_SOURCES = \ - ../common/utils.c \ -@@ -70,7 +70,8 @@ lib: symlinks subdirs depend - $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) Makefile \ - $(TOP)/src/mesa/drivers/dri/Makefile.template - $(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \ -- $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) \ -+ $(OBJECTS) $(EXTRA_MODULES) $(WINOBJ) \ -+ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \ - $(DRI_LIB_DEPS) - - -diff -up mesa-20091221/src/mesa/x86/read_rgba_span_x86.S.da mesa-20091221/src/mesa/x86/read_rgba_span_x86.S ---- mesa-20091221/src/mesa/x86/read_rgba_span_x86.S.da 2009-12-21 08:09:11.000000000 +1000 -+++ mesa-20091221/src/mesa/x86/read_rgba_span_x86.S 2009-12-21 08:43:03.000000000 +1000 -@@ -77,7 +77,6 @@ - */ - - .globl _generic_read_RGBA_span_BGRA8888_REV_MMX --.hidden _generic_read_RGBA_span_BGRA8888_REV_MMX - .type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function - _generic_read_RGBA_span_BGRA8888_REV_MMX: - pushl %ebx -@@ -172,7 +171,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX - */ - - .globl _generic_read_RGBA_span_BGRA8888_REV_SSE --.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE - .type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function - _generic_read_RGBA_span_BGRA8888_REV_SSE: - pushl %esi -@@ -335,7 +333,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE - - .text - .globl _generic_read_RGBA_span_BGRA8888_REV_SSE2 --.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2 - .type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function - _generic_read_RGBA_span_BGRA8888_REV_SSE2: - pushl %esi -@@ -494,7 +491,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE - - .text - .globl _generic_read_RGBA_span_RGB565_MMX -- .hidden _generic_read_RGBA_span_RGB565_MMX - .type _generic_read_RGBA_span_RGB565_MMX, @function - - _generic_read_RGBA_span_RGB565_MMX: diff --git a/mesa-nouveau-fix-build.patch b/mesa-nouveau-fix-build.patch deleted file mode 100644 index ac8d7ce..0000000 --- a/mesa-nouveau-fix-build.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9882bff4ce5843b4122a0348acecc7523b9aee22 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Tue, 12 Apr 2011 21:20:48 +1000 -Subject: [PATCH] nouveau_vieux: fix build since sampler objects merge - ---- - src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 8 ++++---- - src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 8 ++++---- - src/mesa/drivers/dri/nouveau/nv20_state_tex.c | 8 ++++---- - 3 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c -index 6c96e58..648d6b1 100644 ---- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c -+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c -@@ -82,11 +82,11 @@ nv04_emit_tex_obj(struct gl_context *ctx, int emit) - - if (t->Sampler.MinFilter != GL_NEAREST && - t->Sampler.MinFilter != GL_LINEAR) { -- lod_max = CLAMP(MIN2(t->MaxLod, t->_MaxLambda), -+ lod_max = CLAMP(MIN2(t->Sampler.MaxLod, t->_MaxLambda), - 0, 15) + 1; - - lod_bias = CLAMP(ctx->Texture.Unit[i].LodBias + -- t->LodBias, -16, 15) * 8; -+ t->Sampler.LodBias, -16, 15) * 8; - } - - format |= nvgl_wrap_mode(t->Sampler.WrapT) << 28 | -@@ -96,9 +96,9 @@ nv04_emit_tex_obj(struct gl_context *ctx, int emit) - lod_max << 12 | - get_tex_format(ti); - -- filter |= log2i(t->MaxAnisotropy) << 31 | -+ filter |= log2i(t->Sampler.MaxAnisotropy) << 31 | - nvgl_filter_mode(t->Sampler.MagFilter) << 28 | -- log2i(t->MaxAnisotropy) << 27 | -+ log2i(t->Sampler.MaxAnisotropy) << 27 | - nvgl_filter_mode(t->Sampler.MinFilter) << 24 | - (lod_bias & 0xff) << 16; - -diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c -index 1d98b19..620a686 100644 ---- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c -+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c -@@ -183,7 +183,7 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit) - | nvgl_filter_mode(t->Sampler.MinFilter) << 24; - - tx_enable = NV10_3D_TEX_ENABLE_ENABLE -- | log2i(t->MaxAnisotropy) << 4; -+ | log2i(t->Sampler.MaxAnisotropy) << 4; - - if (t->Target == GL_TEXTURE_RECTANGLE) { - BEGIN_RING(chan, celsius, NV10_3D_TEX_NPOT_PITCH(i), 1); -@@ -198,9 +198,9 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit) - - if (t->Sampler.MinFilter != GL_NEAREST && - t->Sampler.MinFilter != GL_LINEAR) { -- int lod_min = t->MinLod; -- int lod_max = MIN2(t->MaxLod, t->_MaxLambda); -- int lod_bias = t->LodBias -+ int lod_min = t->Sampler.MinLod; -+ int lod_max = MIN2(t->Sampler.MaxLod, t->_MaxLambda); -+ int lod_bias = t->Sampler.LodBias - + ctx->Texture.Unit[i].LodBias; - - lod_max = CLAMP(lod_max, 0, 15); -diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c -index fdbfdf4..eab74ae 100644 ---- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c -+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c -@@ -195,7 +195,7 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit) - | 2 << 12; - - tx_enable = NV20_3D_TEX_ENABLE_ENABLE -- | log2i(t->MaxAnisotropy) << 4; -+ | log2i(t->Sampler.MaxAnisotropy) << 4; - - if (t->Target == GL_TEXTURE_RECTANGLE) { - BEGIN_RING(chan, kelvin, NV20_3D_TEX_NPOT_PITCH(i), 1); -@@ -210,9 +210,9 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit) - - if (t->Sampler.MinFilter != GL_NEAREST && - t->Sampler.MinFilter != GL_LINEAR) { -- int lod_min = t->MinLod; -- int lod_max = MIN2(t->MaxLod, t->_MaxLambda); -- int lod_bias = t->LodBias -+ int lod_min = t->Sampler.MinLod; -+ int lod_max = MIN2(t->Sampler.MaxLod, t->_MaxLambda); -+ int lod_bias = t->Sampler.LodBias - + ctx->Texture.Unit[i].LodBias; - - lod_max = CLAMP(lod_max, 0, 15); --- -1.7.4.2 - diff --git a/mesa.spec b/mesa.spec index 0df5b5e..3ee1374 100644 --- a/mesa.spec +++ b/mesa.spec @@ -15,7 +15,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.15.%{gitdate}.0%{?dist} +Release: 0.16.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -360,12 +360,14 @@ rm -rf $RPM_BUILD_ROOT %endif %{_libdir}/dri/r128_dri.so %ifnarch %{sparc} +%ifnarch ppc ppc64 # we no much hardware.... %{_libdir}/dri/mga_dri.so %{_libdir}/dri/savage_dri.so -%{_libdir}/dri/tdfx_dri.so %{_libdir}/dri/unichrome_dri.so %endif +%{_libdir}/dri/tdfx_dri.so +%endif %endif %files libGL-devel @@ -438,6 +440,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Thu Jul 07 2011 Peter Lemenkov - 7.11-0.16.20110620.0 +- Fix building on ppc (some dri1 drivers are missing) + * Wed Jul 6 2011 Ville Skyttä - 7.11-0.15.20110620.0 - More include dir ownership fixes (#682357). diff --git a/sources b/sources index 1155337..1c0de14 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ 6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2 -b8a15e6f9892d004c3407d6a0659fb5b mesa-20110412.tar.xz ee6c00d4c596e4a9dee0cb9599054b81 mesa-20110620.tar.xz From 95ccf3bb067fbcc858f43076facee918780daa36 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 30 Jul 2011 00:29:10 +1000 Subject: [PATCH 11/12] rebase to latest upstream snapshot (same as F15) --- .gitignore | 1 + mesa.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5ce3144..0ff6278 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ mesa-20100720.tar.bz2 /mesa-20110401.tar.xz /mesa-20110412.tar.xz /mesa-20110620.tar.xz +/mesa-20110730.tar.xz diff --git a/mesa.spec b/mesa.spec index 3ee1374..1ab3ef4 100644 --- a/mesa.spec +++ b/mesa.spec @@ -9,13 +9,13 @@ %define _default_patch_fuzz 2 %define manpages gl-manpages-1.0.1 -%define gitdate 20110620 +%define gitdate 20110730 #% define snapshot Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.16.%{gitdate}.0%{?dist} +Release: 0.18.%{gitdate}.0%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -440,6 +440,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Sat Jul 30 2011 Dave Airlie 7.11-0.18.20110730.0 +- rebase to latest upstream snapshot (same as F15) + * Thu Jul 07 2011 Peter Lemenkov - 7.11-0.16.20110620.0 - Fix building on ppc (some dri1 drivers are missing) diff --git a/sources b/sources index 1c0de14..8311068 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2 -ee6c00d4c596e4a9dee0cb9599054b81 mesa-20110620.tar.xz +b834a9ae95534743931a7e8a900b4272 mesa-20110730.tar.xz From 36a1ccb39c881b801efcab64f10f9c46c7c4bafe Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 2 Aug 2011 11:58:35 -0400 Subject: [PATCH 12/12] Mesa 7.11 Redo the driver arch exclusion, yet again. Dear secondary arches: unless it's an on-motherboard driver like i915, all PCI drivers are to be built for all PCI arches. --- .gitignore | 1 + mesa.spec | 46 ++++++++++++++++++++++++++-------------------- sources | 2 +- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 0ff6278..b185d65 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ mesa-20100720.tar.bz2 /mesa-20110412.tar.xz /mesa-20110620.tar.xz /mesa-20110730.tar.xz +/MesaLib-7.11.tar.bz2 diff --git a/mesa.spec b/mesa.spec index 1ab3ef4..3d4ab94 100644 --- a/mesa.spec +++ b/mesa.spec @@ -4,26 +4,37 @@ %define dri_drivers --with-dri-drivers=swrast %else %define with_hardware 1 +%define base_drivers mga,nouveau,r128,radeon,r200,savage,tdfx +%ifarch %{ix86} +%define ix86_drivers ,i810,i915,i965,sis,unichrome +%endif +%ifarch x86_64 +%define amd64_drivers ,i915,i965,unichrome +%endif +%ifarch ia64 +%define ia64_drivers ,i915 +%endif +%define dri_drivers --with-dri-drivers=%{base_drivers}%{?ix86_drivers}%{?amd64_drivers}%{?ia64_drivers} %endif %define _default_patch_fuzz 2 %define manpages gl-manpages-1.0.1 -%define gitdate 20110730 +#define gitdate 20110730 #% define snapshot Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 0.18.%{gitdate}.0%{?dist} +Release: 1%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org #Source0: http://downloads.sf.net/mesa3d/MesaLib-%{version}.tar.bz2 #Source0: http://www.mesa3d.org/beta/MesaLib-%{version}%{?snapshot}.tar.bz2 -#Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2 -Source0: %{name}-%{gitdate}.tar.xz +Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2 +#Source0: %{name}-%{gitdate}.tar.xz Source2: %{manpages}.tar.bz2 Source3: make-git-snapshot.sh @@ -189,17 +200,9 @@ Requires: mesa-libOSMesa = %{version}-%{release} Mesa offscreen rendering development package -%package -n xorg-x11-drv-vmwgfx -Summary: VMware GFX DDX driver -Group: User Interface/X Hardware Support -Requires: Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires videodrv) - -%description -n xorg-x11-drv-vmwgfx -2D driver for VMware SVGA vGPU - %prep -#setup -q -n Mesa-%{version}%{?snapshot} -b0 -b2 -%setup -q -n mesa-%{gitdate} -b2 +%setup -q -n Mesa-%{version}%{?snapshot} -b0 -b2 +#setup -q -n mesa-%{gitdate} -b2 %patch2 -p1 -b .intel-glthread %patch3 -p1 -b .no-mach64 %patch4 -p1 -b .classic @@ -354,21 +357,18 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc docs/COPYING %if %{with_hardware} +%ifarch %{ix86} x86_64 +%{_libdir}/dri/unichrome_dri.so %ifarch %{ix86} %{_libdir}/dri/i810_dri.so %{_libdir}/dri/sis_dri.so %endif +%endif %{_libdir}/dri/r128_dri.so -%ifnarch %{sparc} -%ifnarch ppc ppc64 -# we no much hardware.... %{_libdir}/dri/mga_dri.so %{_libdir}/dri/savage_dri.so -%{_libdir}/dri/unichrome_dri.so -%endif %{_libdir}/dri/tdfx_dri.so %endif -%endif %files libGL-devel %defattr(-,root,root,-) @@ -440,6 +440,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Tue Aug 02 2011 Adam Jackson 7.11-1 +- Mesa 7.11 +- Redo the driver arch exclusion, yet again. Dear secondary arches: unless + it's an on-motherboard driver like i915, all PCI drivers are to be built + for all PCI arches. + * Sat Jul 30 2011 Dave Airlie 7.11-0.18.20110730.0 - rebase to latest upstream snapshot (same as F15) diff --git a/sources b/sources index 8311068..dc42737 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2 -b834a9ae95534743931a7e8a900b4272 mesa-20110730.tar.xz +ff03aca82d0560009a076a87c888cf13 MesaLib-7.11.tar.bz2