From 1d4b3b9da95e9db3fc64d54c25263b04206b2019 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Nov 20 2009 02:03:20 +0000 Subject: - r100 compiz failure on kms (#522399) --- diff --git a/mesa.spec b/mesa.spec index 3b14cd5..4412cc4 100644 --- a/mesa.spec +++ b/mesa.spec @@ -21,7 +21,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.6 -Release: 0.15%{?dist} +Release: 0.16%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -44,6 +44,7 @@ Patch3: mesa-no-mach64.patch Patch7: mesa-7.1-link-shared.patch Patch9: intel-revert-vbl.patch Patch10: r600-fix-tfp.patch +Patch11: r100-fix-compiz.patch Patch13: mesa-7.5-sparc64.patch @@ -180,6 +181,7 @@ This package provides some demo applications for testing Mesa. %patch7 -p1 -b .dricore %patch9 -p1 -b .intel-vbl %patch10 -p1 -b .r600_tfp +%patch11 -p1 -b .r100_tfp %patch13 -p1 -b .sparc64 %patch30 -p1 -b .vblank-warning %patch31 -p1 -b .glx13-warning @@ -389,6 +391,9 @@ rm -rf $RPM_BUILD_ROOT %{demodir} %changelog +* Fri Nov 20 2009 Dave Airlie 7.6-0.16 +- r100 compiz failure on kms (#522399) + * Tue Nov 17 2009 Adam Jackson 7.6-0.15 - mesa-7.6-glx13-app-warning.patch: Make the glXCreatePixmap warning a bit more useful. (#529769) diff --git a/r100-fix-compiz.patch b/r100-fix-compiz.patch new file mode 100644 index 0000000..ee8033f --- /dev/null +++ b/r100-fix-compiz.patch @@ -0,0 +1,53 @@ +From f8ea5318200c1ed839fc387b16a57c8d9969974b Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Fri, 20 Nov 2009 11:45:43 +1000 +Subject: [PATCH] r100: fix texture_from_pixmap and compiz. + +r100 state emission has separate rect and non-rect states, +if we are doing TFP for a TEXTURE_2D we shouldn't use the rect +states as they won't get emitted properly. + +Signed-off-by: Dave Airlie +--- + src/mesa/drivers/dri/radeon/radeon_texstate.c | 17 ++++++++++------- + 1 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c +index 4d9eb73..3cbe3b4 100644 +--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c ++++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c +@@ -714,8 +714,6 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_ + t->tile_bits = 0; + t->image_override = GL_TRUE; + t->override_offset = 0; +- t->pp_txpitch &= (1 << 13) -1; +- pitch_val = rb->pitch; + switch (rb->cpp) { + case 4: + if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT) +@@ -734,12 +732,17 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_ + t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter; + break; + } +- t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT) +- | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT); +- t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2; +- t->pp_txpitch = pitch_val; +- t->pp_txpitch -= 32; + ++ t->pp_txpitch &= (1 << 13) -1; ++ pitch_val = rb->pitch; ++ ++ t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT) ++ | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT); ++ if (target == GL_TEXTURE_RECTANGLE_NV) { ++ t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2; ++ t->pp_txpitch = pitch_val; ++ t->pp_txpitch -= 32; ++ } + t->validated = GL_TRUE; + _mesa_unlock_texture(radeon->glCtx, texObj); + return; +-- +1.6.5.2 +