From d3af8dc0117dc1ce4fea3d05c7a2d7786bd78986 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 May 2012 00:02:14 +0000 Subject: Mon May 14 00:02:13 UTC 2012 --- extra/cairo/PKGBUILD | 45 +- extra/cairo/git_fixes.patch | 1086 ++++++++++++++++++++ extra/dovecot/PKGBUILD | 8 +- extra/gtk3/PKGBUILD | 8 +- extra/gvfs/PKGBUILD | 9 +- extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch | 35 + extra/libvpx/PKGBUILD | 10 +- extra/libxi/PKGBUILD | 6 +- extra/mpg123/PKGBUILD | 8 +- extra/nx/PKGBUILD | 8 +- extra/taglib/PKGBUILD | 11 +- extra/xf86-input-synaptics/PKGBUILD | 6 +- extra/xf86-input-wacom/PKGBUILD | 10 +- extra/xf86-video-apm/PKGBUILD | 13 +- ...man-s-solid-picture-support-for-r300-r600.patch | 571 ++++++++++ ...man-s-solid-picture-support-for-evergreen.patch | 290 ++++++ ...poor-man-s-solid-picture-support-for-r100.patch | 182 ++++ ...poor-man-s-solid-picture-support-for-r200.patch | 179 ++++ extra/xf86-video-ati/PKGBUILD | 27 +- extra/xf86-video-ati/git_fixes.diff | 33 + extra/xf86-video-i740/PKGBUILD | 8 +- extra/xf86-video-s3/PKGBUILD | 16 +- extra/xfce4-genmon-plugin/PKGBUILD | 39 +- ...rlier_and_more_thoroughly_from_exaGlyphsV2.diff | 116 +++ extra/xorg-server/PKGBUILD | 11 +- 25 files changed, 2638 insertions(+), 97 deletions(-) create mode 100644 extra/cairo/git_fixes.patch create mode 100644 extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch create mode 100644 extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch create mode 100644 extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch create mode 100644 extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch create mode 100644 extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch create mode 100644 extra/xf86-video-ati/git_fixes.diff create mode 100644 extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff (limited to 'extra') diff --git a/extra/cairo/PKGBUILD b/extra/cairo/PKGBUILD index 218ab470a..d57a5c8b6 100644 --- a/extra/cairo/PKGBUILD +++ b/extra/cairo/PKGBUILD @@ -1,38 +1,57 @@ -# $Id: PKGBUILD 148684 2012-02-05 11:46:48Z ibiru $ +# $Id: PKGBUILD 158854 2012-05-12 13:09:25Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Brice Carpentier pkgname=cairo -pkgver=1.10.2 -pkgrel=3 +#_gitdate=20120426 +#_gitver=957a9cc619965178a8927d114fe852034fc2385c +pkgver=1.12.2 +pkgrel=1 pkgdesc="Cairo vector graphics library" arch=(i686 x86_64) license=('LGPL' 'MPL') url="http://cairographics.org/" depends=('libpng' 'libxrender' 'fontconfig' 'pixman' 'glib2' 'sh') +makedepends=('librsvg' 'poppler-glib' 'libspectre' 'gtk-doc') # 'libdrm') +optdepends=('xcb-util: for XCB backend') # really needed? +provides=('cairo-xcb') +replaces=('cairo-xcb') options=('!libtool') -source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.gz - cairo-1.10.0-buggy_gradients.patch) -sha1sums=('ccce5ae03f99c505db97c286a0c9a90a926d3c6e' - '8b843a9934e5112b6188e5bcf4adfc1fdaf9fa04') +source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.xz + #$pkgname-$pkgver.tar.gz::http://cgit.freedesktop.org/cairo/snapshot/cairo-${_gitver}.tar.gz + cairo-1.10.0-buggy_gradients.patch + #git_fixes.patch +) +md5sums=('87649eb75789739d517c743e94879e51' + '9b323790dab003e228c6955633cb888e') build() { cd "$srcdir/$pkgname-$pkgver" - patch -Np1 -i "${srcdir}/cairo-1.10.0-buggy_gradients.patch" + #cd ${srcdir}/${pkgname}-${_gitver} + patch -Np1 -i ${srcdir}/cairo-1.10.0-buggy_gradients.patch + # status is 2012-04-26 last commit: image: Fix typo in _blit_spans() + #patch -Np1 -i ${srcdir}/git_fixes.patch + autoreconf -vfi + #./autogen.sh --prefix=/usr \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-static \ - --enable-tee + --enable-tee \ + --disable-xlib-xcb \ + # --enable-test-surfaces \ takes ages + #--enable-drm # breaks build make } -check() { - cd "$srcdir/$pkgname-$pkgver" - make check || /bin/true # 248 Passed, 65 Failed [2 crashed, 8 expected], 28 Skipped -} +#check() { +# #cd "$srcdir/$pkgname-$pkgver" +# cd $srcdir/$pkgname-${_gitver} +# make -k check || /bin/true # 165 Passed, 316 Failed [3 crashed, 10 expected], 23 Skipped +#} package() { cd "$srcdir/$pkgname-$pkgver" + #cd $srcdir/$pkgname-${_gitver} make DESTDIR="$pkgdir" install } diff --git a/extra/cairo/git_fixes.patch b/extra/cairo/git_fixes.patch new file mode 100644 index 000000000..6ad8979eb --- /dev/null +++ b/extra/cairo/git_fixes.patch @@ -0,0 +1,1086 @@ +From ede11b2954db19e3ca9d31cef7d04a7bf0e42ddc Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod +Date: Sun, 25 Mar 2012 18:37:14 +0000 +Subject: Fix math in comments + +--- +diff --git a/src/cairo-arc.c b/src/cairo-arc.c +index dc07fee..6977e88 100644 +--- a/src/cairo-arc.c ++++ b/src/cairo-arc.c +@@ -139,7 +139,7 @@ _arc_segments_needed (double angle, + + From that paper, a very practical value of h is: + +- h = 4/3 * tan(angle/4) ++ h = 4/3 * R * tan(angle/4) + + This value does not give the spline with minimal error, but it does + provide a very good approximation, (6th-order convergence), and the +-- +cgit v0.9.0.2-2-gbebe +From fba21ef2a4c4eb343668267fda713aedbb6af2a4 Mon Sep 17 00:00:00 2001 +From: Henry (Yu) Song +Date: Tue, 27 Mar 2012 21:25:37 +0000 +Subject: gl: use font's antialias option to check whether it needs mask + +There is need to loop over number of glyphs to check wether the glyph +image is a ARGB32 as the font's antialias option can be used for checking. +If antialias is SUBPIXEL or BEST, the glyph surface will be ARGB32, +otherwise it will be A8 format. Therefore we will only be using +component-alpha at SUBPIXEL (or better) font quality and only then need +a mask for multiple pass glyph composition. +--- +diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c +index 832956f..9756ea4 100644 +--- a/src/cairo-gl-glyphs.c ++++ b/src/cairo-gl-glyphs.c +@@ -427,23 +427,15 @@ _cairo_gl_composite_glyphs (void *_dst, + + TRACE ((stderr, "%s\n", __FUNCTION__)); + +- /* If any of the glyphs are component alpha, we have to go through a mask, +- * since only _cairo_gl_surface_composite() currently supports component +- * alpha. ++ /* If any of the glyphs require component alpha, we have to go through ++ * a mask, since only _cairo_gl_surface_composite() currently supports ++ * component alpha. + */ +- if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER) { +- for (i = 0; i < info->num_glyphs; i++) { +- cairo_scaled_glyph_t *scaled_glyph; +- +- if (_cairo_scaled_glyph_lookup (info->font, info->glyphs[i].index, +- CAIRO_SCALED_GLYPH_INFO_SURFACE, +- &scaled_glyph) == CAIRO_INT_STATUS_SUCCESS && +- scaled_glyph->surface->format == CAIRO_FORMAT_ARGB32) +- { +- info->use_mask = TRUE; +- break; +- } +- } ++ if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER && ++ (info->font->options.antialias == CAIRO_ANTIALIAS_SUBPIXEL || ++ info->font->options.antialias == CAIRO_ANTIALIAS_BEST)) ++ { ++ info->use_mask = TRUE; + } + + if (info->use_mask) { +-- +cgit v0.9.0.2-2-gbebe +From d304f0e57be8036719c3709e2419487326369105 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Wed, 28 Mar 2012 23:32:36 +0000 +Subject: composite-rectangles: Trim extents for SOURCE and CLEAR to the mask + +The SOURCE and CLEAR are the odd pair in Cairo's range of operators that +are bound by the shape/mask, but are unbound by the source. This +regularly leads to bugs as only track the bound/unbound rectangles and +confuse the meaning when bound only by the mask. + +What is required is that the unbound extents in this case is only +trimmed by the mask (the bounded extents are still the intersection of +all). + +Fixes bug-source-cu + +Signed-off-by: Chris Wilson +--- +diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c +index 106571e..8c5cd5a 100644 +--- a/src/cairo-composite-rectangles.c ++++ b/src/cairo-composite-rectangles.c +@@ -147,8 +147,12 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents, + if (! ret && extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) + return CAIRO_INT_STATUS_NOTHING_TO_DO; + +- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) ++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) { + extents->unbounded = extents->bounded; ++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) { ++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask)) ++ return CAIRO_INT_STATUS_NOTHING_TO_DO; ++ } + + extents->clip = _cairo_clip_reduce_for_composite (clip, extents); + if (_cairo_clip_is_all_clipped (extents->clip)) +@@ -199,8 +203,12 @@ _cairo_composite_rectangles_intersect_source_extents (cairo_composite_rectangles + rect.height == extents->bounded.height) + return CAIRO_INT_STATUS_SUCCESS; + +- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) ++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) { + extents->unbounded = extents->bounded; ++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) { ++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask)) ++ return CAIRO_INT_STATUS_NOTHING_TO_DO; ++ } + + clip = extents->clip; + extents->clip = _cairo_clip_reduce_for_composite (clip, extents); +@@ -253,8 +261,12 @@ _cairo_composite_rectangles_intersect_mask_extents (cairo_composite_rectangles_t + mask.height == extents->bounded.height) + return CAIRO_INT_STATUS_SUCCESS; + +- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) ++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) { + extents->unbounded = extents->bounded; ++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) { ++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask)) ++ return CAIRO_INT_STATUS_NOTHING_TO_DO; ++ } + + clip = extents->clip; + extents->clip = _cairo_clip_reduce_for_composite (clip, extents); +-- +cgit v0.9.0.2-2-gbebe +From af6e084dd78fcbb8ecce46c57f655f5e24343b8c Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Thu, 29 Mar 2012 13:48:24 +0000 +Subject: cairoint: Mark PDF surface as requiring the deflate stream output + +Signed-off-by: Chris Wilson +--- +diff --git a/src/cairoint.h b/src/cairoint.h +index 9a8003e..9f20d51 100644 +--- a/src/cairoint.h ++++ b/src/cairoint.h +@@ -73,7 +73,10 @@ + #include "cairo-compiler-private.h" + #include "cairo-error-private.h" + +-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_SCRIPT_SURFACE || CAIRO_HAS_XML_SURFACE ++#if CAIRO_HAS_PDF_SURFACE || \ ++ CAIRO_HAS_PS_SURFACE || \ ++ CAIRO_HAS_SCRIPT_SURFACE || \ ++ CAIRO_HAS_XML_SURFACE + #define CAIRO_HAS_DEFLATE_STREAM 1 + #endif + +@@ -84,7 +87,9 @@ + #define CAIRO_HAS_FONT_SUBSET 1 + #endif + +-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_PDF_SURFACE || CAIRO_HAS_FONT_SUBSET ++#if CAIRO_HAS_PS_SURFACE || \ ++ CAIRO_HAS_PDF_SURFACE || \ ++ CAIRO_HAS_FONT_SUBSET + #define CAIRO_HAS_PDF_OPERATORS 1 + #endif + +-- +cgit v0.9.0.2-2-gbebe +From a965b0f95fdeb567f7ccb51f7c8c47735a61e2d9 Mon Sep 17 00:00:00 2001 +From: Henry (Yu) Song +Date: Thu, 29 Mar 2012 01:08:51 +0000 +Subject: gl: fix y-axis origin when map_to_image() for non texture GL surface + +We need to fix y-axis origin when map a GL surface to image surface for +non-texture GL surface. + +Test cases: extended-blend-alpha-mask, extended-blend-mask. +Although the image outputs is not right, but the image on the first grid +(upper-left corner) is correct comparing to image output. +--- +diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c +index 8bbf939..32ecf63 100644 +--- a/src/cairo-gl-surface.c ++++ b/src/cairo-gl-surface.c +@@ -985,6 +985,7 @@ _cairo_gl_surface_map_to_image (void *abstract_surface, + unsigned int cpp; + cairo_bool_t invert; + cairo_status_t status; ++ int y; + + /* Want to use a switch statement here but the compiler gets whiny. */ + if (surface->base.content == CAIRO_CONTENT_COLOR_ALPHA) { +@@ -1065,7 +1066,12 @@ _cairo_gl_surface_map_to_image (void *abstract_surface, + glPixelStorei (GL_PACK_ROW_LENGTH, image->stride / cpp); + if (invert) + glPixelStorei (GL_PACK_INVERT_MESA, 1); +- glReadPixels (extents->x, extents->y, ++ ++ y = extents->y; ++ if (! _cairo_gl_surface_is_texture (surface)) ++ y = surface->height - extents->y - extents->height; ++ ++ glReadPixels (extents->x, y, + extents->width, extents->height, + format, type, image->data); + if (invert) +-- +cgit v0.9.0.2-2-gbebe +From c77112c5464d7ff21052527f82f4d729cc509291 Mon Sep 17 00:00:00 2001 +From: Uli Schlachter +Date: Mon, 02 Apr 2012 18:43:00 +0000 +Subject: xcb: Fix SHM in _get_image() + +Commit 2283ab9 introduced a logic error. Instead of falling back to the non-SHM +path when getting the image via SHM failed, we now did the fallback when getting +the image via SHM worked (which means that the SHM operation was a waste of +time). + +Signed-off-by: Uli Schlachter +--- +diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c +index fff4f52..6bedbda 100644 +--- a/src/cairo-xcb-surface.c ++++ b/src/cairo-xcb-surface.c +@@ -367,7 +367,7 @@ _get_image (cairo_xcb_surface_t *surface, + if (use_shm) { + image = _get_shm_image (surface, x, y, width, height); + if (image) { +- if (image->status) { ++ if (image->status == CAIRO_STATUS_SUCCESS) { + _cairo_xcb_connection_release (connection); + return image; + } +-- +cgit v0.9.0.2-2-gbebe +From cc247c346b75353f16ab40ac74c54cdd9663d16b Mon Sep 17 00:00:00 2001 +From: Henry (Yu) Song +Date: Mon, 02 Apr 2012 21:29:47 +0000 +Subject: gl: Remove an unused variable + +--- +diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c +index b364b92..ce7c0dd 100644 +--- a/src/cairo-gl-gradient.c ++++ b/src/cairo-gl-gradient.c +@@ -207,7 +207,6 @@ _cairo_gl_gradient_create (cairo_gl_context_t *ctx, + cairo_status_t status; + int tex_width; + void *data; +- cairo_gl_dispatch_t *dispatch = &ctx->dispatch; + + if ((unsigned int) ctx->max_texture_size / 2 <= n_stops) + return CAIRO_INT_STATUS_UNSUPPORTED; +-- +cgit v0.9.0.2-2-gbebe +From 7a262fd398c8a1f3c9052e8d9ec459e27ff91b4d Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Wed, 04 Apr 2012 10:23:09 +0000 +Subject: fix bug in _cairo_image_analyze_color + +--- +diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c +index 8208a15..e860e1b 100644 +--- a/src/cairo-image-surface.c ++++ b/src/cairo-image-surface.c +@@ -1130,9 +1130,12 @@ _cairo_image_analyze_color (cairo_image_surface_t *image) + if (image->color != CAIRO_IMAGE_UNKNOWN_COLOR) + return image->color; + +- if (image->format == CAIRO_FORMAT_A1 || image->format == CAIRO_FORMAT_A8) ++ if (image->format == CAIRO_FORMAT_A1) + return image->color = CAIRO_IMAGE_IS_MONOCHROME; + ++ if (image->format == CAIRO_FORMAT_A8) ++ return image->color = CAIRO_IMAGE_IS_GRAYSCALE; ++ + if (image->format == CAIRO_FORMAT_ARGB32) { + image->color = CAIRO_IMAGE_IS_MONOCHROME; + for (y = 0; y < image->height; y++) { +-- +cgit v0.9.0.2-2-gbebe +From 70b2856ed3d31b41e69b3d82fb9c5c11c2b3d3d4 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Thu, 05 Apr 2012 23:43:35 +0000 +Subject: type1-subset: use fallback font if glyph widths are calculated + +Bug 48349 has a pdf file with a Type 1 font where the glyph widths are +of the form: + +34 9302 19 div hsbw +--- +diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c +index 607ac8e..ba1008a 100644 +--- a/src/cairo-type1-subset.c ++++ b/src/cairo-type1-subset.c +@@ -751,6 +751,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font, + command = *p++; + switch (command) { + case TYPE1_CHARSTRING_COMMAND_HSBW: ++ if (! last_op_was_integer) ++ return CAIRO_INT_STATUS_UNSUPPORTED; ++ + font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em; + font->build_stack.sp = 0; + last_op_was_integer = FALSE; +@@ -797,6 +800,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font, + break; + + case TYPE1_CHARSTRING_COMMAND_SBW: ++ if (! last_op_was_integer) ++ return CAIRO_INT_STATUS_UNSUPPORTED; ++ + font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em; + font->build_stack.sp = 0; + last_op_was_integer = FALSE; +-- +cgit v0.9.0.2-2-gbebe +From a6d955fcc46ae2da8d6f3b2cadeae64c03066461 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Thu, 05 Apr 2012 23:53:50 +0000 +Subject: fix indentation in cairo_type1_font_subset_parse_charstring + +--- +diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c +index ba1008a..ddef8ae 100644 +--- a/src/cairo-type1-subset.c ++++ b/src/cairo-type1-subset.c +@@ -1,3 +1,4 @@ ++/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */ + /* cairo - a vector graphics library with display and print output + * + * Copyright © 2006 Red Hat, Inc +@@ -750,86 +751,79 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font, + if (*p < 32) { + command = *p++; + switch (command) { +- case TYPE1_CHARSTRING_COMMAND_HSBW: +- if (! last_op_was_integer) +- return CAIRO_INT_STATUS_UNSUPPORTED; ++ case TYPE1_CHARSTRING_COMMAND_HSBW: ++ if (! last_op_was_integer) ++ return CAIRO_INT_STATUS_UNSUPPORTED; ++ ++ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em; ++ font->build_stack.sp = 0; ++ last_op_was_integer = FALSE; ++ break; ++ ++ case TYPE1_CHARSTRING_COMMAND_CALLSUBR: ++ if (font->subset_subrs && ++ last_op_was_integer && ++ font->build_stack.top_value >= 0 && ++ font->build_stack.top_value < font->num_subrs) ++ { ++ subr_num = font->build_stack.top_value; ++ font->subrs[subr_num].used = TRUE; ++ last_op_was_integer = FALSE; ++ status = cairo_type1_font_subset_parse_charstring (font, ++ glyph, ++ font->subrs[subr_num].subr_string, ++ font->subrs[subr_num].subr_length); ++ } else { ++ font->subset_subrs = FALSE; ++ } ++ break; ++ ++ case TYPE1_CHARSTRING_COMMAND_ESCAPE: ++ command = command << 8 | *p++; ++ switch (command) { ++ case TYPE1_CHARSTRING_COMMAND_SEAC: ++ /* The seac command takes five integer arguments. The ++ * last two are glyph indices into the PS standard ++ * encoding give the names of the glyphs that this ++ * glyph is composed from. All we need to do is to ++ * make sure those glyphs are present in the subset ++ * under their standard names. */ ++ status = use_standard_encoding_glyph (font, font->build_stack.stack[3]); ++ if (unlikely (status)) ++ return status; ++ ++ status = use_standard_encoding_glyph (font, font->build_stack.stack[4]); ++ if (unlikely (status)) ++ return status; + +- font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em; + font->build_stack.sp = 0; + last_op_was_integer = FALSE; + break; + +- case TYPE1_CHARSTRING_COMMAND_CALLSUBR: +- if (font->subset_subrs && +- last_op_was_integer && +- font->build_stack.top_value >= 0 && +- font->build_stack.top_value < font->num_subrs) +- { +- subr_num = font->build_stack.top_value; +- font->subrs[subr_num].used = TRUE; +- last_op_was_integer = FALSE; +- status = cairo_type1_font_subset_parse_charstring (font, +- glyph, +- font->subrs[subr_num].subr_string, +- font->subrs[subr_num].subr_length); +- } else { +- font->subset_subrs = FALSE; +- } ++ case TYPE1_CHARSTRING_COMMAND_SBW: ++ if (! last_op_was_integer) ++ return CAIRO_INT_STATUS_UNSUPPORTED; ++ ++ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em; ++ font->build_stack.sp = 0; ++ last_op_was_integer = FALSE; + break; + +- case TYPE1_CHARSTRING_COMMAND_ESCAPE: +- command = command << 8 | *p++; +- switch (command) { +- case TYPE1_CHARSTRING_COMMAND_SEAC: +- /* The seac command takes five integer arguments. The +- * last two are glyph indices into the PS standard +- * encoding give the names of the glyphs that this +- * glyph is composed from. All we need to do is to +- * make sure those glyphs are present in the subset +- * under their standard names. */ +- status = use_standard_encoding_glyph (font, font->build_stack.stack[3]); +- if (unlikely (status)) +- return status; +- +- status = use_standard_encoding_glyph (font, font->build_stack.stack[4]); +- if (unlikely (status)) +- return status; +- +- font->build_stack.sp = 0; +- last_op_was_integer = FALSE; +- break; +- +- case TYPE1_CHARSTRING_COMMAND_SBW: +- if (! last_op_was_integer) +- return CAIRO_INT_STATUS_UNSUPPORTED; +- +- font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em; +- font->build_stack.sp = 0; +- last_op_was_integer = FALSE; +- break; +- +- case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR: +- for (i = 0; i < font->build_stack.sp; i++) +- font->ps_stack.other_subr_args[i] = font->build_stack.stack[i]; +- font->ps_stack.num_other_subr_args = font->build_stack.sp; +- font->ps_stack.cur_other_subr_arg = 0; +- font->build_stack.sp = 0; +- last_op_was_integer = FALSE; +- break; +- +- case TYPE1_CHARSTRING_COMMAND_POP: +- if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) { +- font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++]; +- last_op_was_integer = TRUE; +- } else { +- font->subset_subrs = FALSE; +- } +- break; +- +- default: +- font->build_stack.sp = 0; +- last_op_was_integer = FALSE; +- break; ++ case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR: ++ for (i = 0; i < font->build_stack.sp; i++) ++ font->ps_stack.other_subr_args[i] = font->build_stack.stack[i]; ++ font->ps_stack.num_other_subr_args = font->build_stack.sp; ++ font->ps_stack.cur_other_subr_arg = 0; ++ font->build_stack.sp = 0; ++ last_op_was_integer = FALSE; ++ break; ++ ++ case TYPE1_CHARSTRING_COMMAND_POP: ++ if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) { ++ font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++]; ++ last_op_was_integer = TRUE; ++ } else { ++ font->subset_subrs = FALSE; + } + break; + +@@ -837,6 +831,13 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font, + font->build_stack.sp = 0; + last_op_was_integer = FALSE; + break; ++ } ++ break; ++ ++ default: ++ font->build_stack.sp = 0; ++ last_op_was_integer = FALSE; ++ break; + } + } else { + /* integer argument */ +-- +cgit v0.9.0.2-2-gbebe +From 8886220b5027296f5b3b95e9c2f93509108d3b9e Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Fri, 06 Apr 2012 00:13:53 +0000 +Subject: type1-subset: if font name is prefixed with a subset tag, strip it off + +--- +diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c +index ddef8ae..e507abe 100644 +--- a/src/cairo-type1-subset.c ++++ b/src/cairo-type1-subset.c +@@ -381,6 +381,7 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font) + { + const char *start, *end, *segment_end; + char *s; ++ int i; + + segment_end = font->header_segment + font->header_segment_size; + start = find_token (font->header_segment, segment_end, "/FontName"); +@@ -406,6 +407,16 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font) + return CAIRO_INT_STATUS_UNSUPPORTED; + } + ++ /* If font name is prefixed with a subset tag, strip it off. */ ++ if (strlen(start) > 7 && start[6] == '+') { ++ for (i = 0; i < 6; i++) { ++ if (start[i] < 'A' || start[i] > 'Z') ++ break; ++ } ++ if (i == 6) ++ start += 7; ++ } ++ + font->base.base_font = strdup (start); + free (s); + if (unlikely (font->base.base_font == NULL)) +-- +cgit v0.9.0.2-2-gbebe +From 8657ca10e34b0034602680b4304d47ecf90ccbfd Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Fri, 06 Apr 2012 11:50:40 +0000 +Subject: fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces + +It had caused pdf bbox sizes to regress to page size bboxes. +--- +diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c +index 27ba004..5b3e177 100644 +--- a/src/cairo-pattern.c ++++ b/src/cairo-pattern.c +@@ -37,6 +37,7 @@ + #include "cairo-path-private.h" + #include "cairo-pattern-private.h" + #include "cairo-recording-surface-private.h" ++#include "cairo-surface-snapshot-private.h" + + #include + +@@ -3666,6 +3667,9 @@ _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern, + (const cairo_surface_pattern_t *) pattern; + cairo_surface_t *surface = surface_pattern->surface; + ++ if (_cairo_surface_is_snapshot (surface)) ++ surface = _cairo_surface_snapshot_get_target (surface); ++ + if (_cairo_surface_is_recording (surface)) { + cairo_matrix_t imatrix; + cairo_box_t box; +-- +cgit v0.9.0.2-2-gbebe +From 6f28f0b33cb12f3b2dd48c87da0018bd00c17107 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 08 Apr 2012 10:28:59 +0000 +Subject: stroke: Fix misuse of half_line_x for vertical caps on dashes + +A typo using half_line_x instead of half_line_y when emitting dashed +segments of the rectilinear stroke. + +Signed-off-by: Chris Wilson +--- +diff --git a/src/cairo-path-stroke-boxes.c b/src/cairo-path-stroke-boxes.c +index 3e8c5a4..cc9dd19 100644 +--- a/src/cairo-path-stroke-boxes.c ++++ b/src/cairo-path-stroke-boxes.c +@@ -342,15 +342,15 @@ _cairo_rectilinear_stroker_emit_segments_dashed (cairo_rectilinear_stroker_t *st + box.p1.x = box.p2.x - half_line_x; + } + if (out_slope.dy >= 0) +- box.p1.y -= half_line_x; ++ box.p1.y -= half_line_y; + if (out_slope.dy <= 0) +- box.p2.y += half_line_x; ++ box.p2.y += half_line_y; + } else { + if (box.p1.y <= box.p2.y) { + box.p1.y = box.p2.y; +- box.p2.y += half_line_x; ++ box.p2.y += half_line_y; + } else { +- box.p1.y = box.p2.y - half_line_x; ++ box.p1.y = box.p2.y - half_line_y; + } + if (out_slope.dx >= 0) + box.p1.x -= half_line_x; +-- +cgit v0.9.0.2-2-gbebe +From 113ec6bf0c8ed1ff12293d1ed2a2de9bd5b9904b Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 08 Apr 2012 16:58:13 +0000 +Subject: traps: Clip the trapezoid extents against the clip extents + +Just in case the clip polygon turns out to be much larger than the +operation extents (silly us for not reducing it correctly) and lead to +catastrophe, such as: + +Program received signal SIGSEGV, Segmentation fault. +pixman_fill_sse2 (bits=, stride=4, bpp=8, x=0, y=0, +width=3, height=-34811, data=0) at pixman-sse2.c:3369 +3369 *(uint16_t *)d = data; + +Signed-off-by: Chris Wilson +--- +diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c +index 284a0be..c49e208 100644 +--- a/src/cairo-traps-compositor.c ++++ b/src/cairo-traps-compositor.c +@@ -218,8 +218,13 @@ combine_clip_as_traps (const cairo_traps_compositor_t *compositor, + _cairo_traps_fini (&traps); + cairo_surface_destroy (src); + +- if (status == CAIRO_INT_STATUS_SUCCESS && +- (fixup.width < extents->width || fixup.height < extents->height)) { ++ if (unlikely (status)) ++ return status; ++ ++ if (! _cairo_rectangle_intersect (&fixup, extents)) ++ return CAIRO_STATUS_SUCCESS; ++ ++ if (fixup.width < extents->width || fixup.height < extents->height) { + cairo_boxes_t clear; + + _cairo_boxes_init (&clear); +-- +cgit v0.9.0.2-2-gbebe +From de61681574eb7d6e0e497ea7f25797e3d9b20ac4 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Mon, 09 Apr 2012 11:47:34 +0000 +Subject: build: Disable -Wset-but-unused-variable + +This is too noisy in the current build, and masking more important +warnings. + +Signed-off-by: Chris Wilson +--- +diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings +index 3eb0104..f1b17f4 100644 +--- a/build/configure.ac.warnings ++++ b/build/configure.ac.warnings +@@ -21,6 +21,9 @@ MAYBE_WARN="-Wall -Wextra \ + -Wno-missing-field-initializers -Wno-unused-parameter \ + -Wno-attributes -Wno-long-long -Winline" + ++# -Wunused-but-set-variable is too noisy at present ++NO_WARN="-Wno-unused-but-set-variable" ++ + dnl Sun Studio 12 likes to rag at us for abusing enums like + dnl having cairo_status_t variables hold cairo_int_status_t + dnl values. It's bad, we know. Now please be quiet. +@@ -34,6 +37,8 @@ MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common -flto" + dnl Also to turn various gcc/glibc-specific preprocessor checks + MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2" + ++MAYBE_WARN="$MAYBE_WARN $NO_WARN" ++ + # invalidate cached value if MAYBE_WARN has changed + if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then + unset cairo_cv_warn_cflags +-- +cgit v0.9.0.2-2-gbebe +From 7cb5053c0694992320b5f7ea3b91ea497431813b Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Mon, 09 Apr 2012 11:49:20 +0000 +Subject: analysis: Apply the integer translation to the bbox as well + +The bbox is used to compute the ink extents (and so the pattern extents +of a recording surface) and if given an integer translation we failed to +transform the bbox into the target space. + +Fixes mask (pdf). + +Signed-off-by: Chris Wilson +--- +diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c +index b8abe02..8878f62 100644 +--- a/src/cairo-analysis-surface.c ++++ b/src/cairo-analysis-surface.c +@@ -220,6 +220,14 @@ _add_operation (cairo_analysis_surface_t *surface, + if (_cairo_matrix_is_integer_translation (&surface->ctm, &tx, &ty)) { + rect->x += tx; + rect->y += ty; ++ ++ tx = _cairo_fixed_from_int (tx); ++ bbox.p1.x += tx; ++ bbox.p2.x += tx; ++ ++ ty = _cairo_fixed_from_int (ty); ++ bbox.p1.y += ty; ++ bbox.p2.y += ty; + } else { + _cairo_matrix_transform_bounding_box_fixed (&surface->ctm, + &bbox, NULL); +-- +cgit v0.9.0.2-2-gbebe +From 038e4991912656a3239ca82d60056ca129016ba6 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Mon, 09 Apr 2012 08:31:44 +0000 +Subject: pdf: avoid unnecessary use of patterns in mask groups + +--- +diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c +index 4930e72..78537ce 100644 +--- a/src/cairo-pdf-surface.c ++++ b/src/cairo-pdf-surface.c +@@ -5703,56 +5703,68 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, + if (unlikely (status)) + return status; + +- pattern_res.id = 0; +- gstate_res.id = 0; +- status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL, +- &pattern_res, &gstate_res); +- if (unlikely (status)) +- return status; +- +- if (gstate_res.id != 0) { +- smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents); +- if (unlikely (smask_group == NULL)) +- return _cairo_error (CAIRO_STATUS_NO_MEMORY); +- +- smask_group->width = group->width; +- smask_group->height = group->height; +- smask_group->operation = PDF_PAINT; +- smask_group->source = cairo_pattern_reference (group->mask); +- smask_group->source_res = pattern_res; +- status = _cairo_pdf_surface_add_smask_group (surface, smask_group); +- if (unlikely (status)) { +- _cairo_pdf_smask_group_destroy (smask_group); +- return status; +- } +- +- status = _cairo_pdf_surface_add_smask (surface, gstate_res); +- if (unlikely (status)) +- return status; +- +- status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res); ++ if (_can_paint_pattern (group->mask)) { ++ _cairo_output_stream_printf (surface->output, "q\n"); ++ status = _cairo_pdf_surface_paint_pattern (surface, ++ group->mask, ++ &group->extents, ++ FALSE); + if (unlikely (status)) + return status; + +- _cairo_output_stream_printf (surface->output, +- "q /s%d gs /x%d Do Q\n", +- gstate_res.id, +- smask_group->group_res.id); ++ _cairo_output_stream_printf (surface->output, "Q\n"); + } else { +- status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE); ++ pattern_res.id = 0; ++ gstate_res.id = 0; ++ status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL, ++ &pattern_res, &gstate_res); + if (unlikely (status)) + return status; + +- _cairo_output_stream_printf (surface->output, +- "%f %f %f %f re f\n", +- bbox.p1.x, +- bbox.p1.y, +- bbox.p2.x - bbox.p1.x, +- bbox.p2.y - bbox.p1.y); ++ if (gstate_res.id != 0) { ++ smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents); ++ if (unlikely (smask_group == NULL)) ++ return _cairo_error (CAIRO_STATUS_NO_MEMORY); + +- status = _cairo_pdf_surface_unselect_pattern (surface); +- if (unlikely (status)) +- return status; ++ smask_group->width = group->width; ++ smask_group->height = group->height; ++ smask_group->operation = PDF_PAINT; ++ smask_group->source = cairo_pattern_reference (group->mask); ++ smask_group->source_res = pattern_res; ++ status = _cairo_pdf_surface_add_smask_group (surface, smask_group); ++ if (unlikely (status)) { ++ _cairo_pdf_smask_group_destroy (smask_group); ++ return status; ++ } ++ ++ status = _cairo_pdf_surface_add_smask (surface, gstate_res); ++ if (unlikely (status)) ++ return status; ++ ++ status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res); ++ if (unlikely (status)) ++ return status; ++ ++ _cairo_output_stream_printf (surface->output, ++ "q /s%d gs /x%d Do Q\n", ++ gstate_res.id, ++ smask_group->group_res.id); ++ } else { ++ status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE); ++ if (unlikely (status)) ++ return status; ++ ++ _cairo_output_stream_printf (surface->output, ++ "%f %f %f %f re f\n", ++ bbox.p1.x, ++ bbox.p1.y, ++ bbox.p2.x - bbox.p1.x, ++ bbox.p2.y - bbox.p1.y); ++ ++ status = _cairo_pdf_surface_unselect_pattern (surface); ++ if (unlikely (status)) ++ return status; ++ } + } + + status = _cairo_pdf_surface_close_group (surface, &mask_group); +@@ -5764,54 +5776,66 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, + if (unlikely (status)) + return status; + +- pattern_res.id = 0; +- gstate_res.id = 0; +- status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL, +- &pattern_res, &gstate_res); +- if (unlikely (status)) +- return status; +- +- if (gstate_res.id != 0) { +- smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents); +- if (unlikely (smask_group == NULL)) +- return _cairo_error (CAIRO_STATUS_NO_MEMORY); +- +- smask_group->operation = PDF_PAINT; +- smask_group->source = cairo_pattern_reference (group->source); +- smask_group->source_res = pattern_res; +- status = _cairo_pdf_surface_add_smask_group (surface, smask_group); +- if (unlikely (status)) { +- _cairo_pdf_smask_group_destroy (smask_group); +- return status; +- } +- +- status = _cairo_pdf_surface_add_smask (surface, gstate_res); +- if (unlikely (status)) +- return status; +- +- status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res); ++ if (_can_paint_pattern (group->source)) { ++ _cairo_output_stream_printf (surface->output, "q\n"); ++ status = _cairo_pdf_surface_paint_pattern (surface, ++ group->source, ++ &group->extents, ++ FALSE); + if (unlikely (status)) + return status; + +- _cairo_output_stream_printf (surface->output, +- "q /s%d gs /x%d Do Q\n", +- gstate_res.id, +- smask_group->group_res.id); ++ _cairo_output_stream_printf (surface->output, "Q\n"); + } else { +- status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE); ++ pattern_res.id = 0; ++ gstate_res.id = 0; ++ status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL, ++ &pattern_res, &gstate_res); + if (unlikely (status)) + return status; + +- _cairo_output_stream_printf (surface->output, +- "%f %f %f %f re f\n", +- bbox.p1.x, +- bbox.p1.y, +- bbox.p2.x - bbox.p1.x, +- bbox.p2.y - bbox.p1.y); ++ if (gstate_res.id != 0) { ++ smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents); ++ if (unlikely (smask_group == NULL)) ++ return _cairo_error (CAIRO_STATUS_NO_MEMORY); + +- status = _cairo_pdf_surface_unselect_pattern (surface); +- if (unlikely (status)) +- return status; ++ smask_group->operation = PDF_PAINT; ++ smask_group->source = cairo_pattern_reference (group->source); ++ smask_group->source_res = pattern_res; ++ status = _cairo_pdf_surface_add_smask_group (surface, smask_group); ++ if (unlikely (status)) { ++ _cairo_pdf_smask_group_destroy (smask_group); ++ return status; ++ } ++ ++ status = _cairo_pdf_surface_add_smask (surface, gstate_res); ++ if (unlikely (status)) ++ return status; ++ ++ status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res); ++ if (unlikely (status)) ++ return status; ++ ++ _cairo_output_stream_printf (surface->output, ++ "q /s%d gs /x%d Do Q\n", ++ gstate_res.id, ++ smask_group->group_res.id); ++ } else { ++ status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE); ++ if (unlikely (status)) ++ return status; ++ ++ _cairo_output_stream_printf (surface->output, ++ "%f %f %f %f re f\n", ++ bbox.p1.x, ++ bbox.p1.y, ++ bbox.p2.x - bbox.p1.x, ++ bbox.p2.y - bbox.p1.y); ++ ++ status = _cairo_pdf_surface_unselect_pattern (surface); ++ if (unlikely (status)) ++ return status; ++ } + } + + status = _cairo_pdf_surface_close_group (surface, NULL); +-- +cgit v0.9.0.2-2-gbebe +From 9fcbe25c2dcf831783bb0fd20af9754c0b5c409b Mon Sep 17 00:00:00 2001 +From: Maarten Bosmans +Date: Mon, 09 Apr 2012 19:33:50 +0000 +Subject: Protect code using dlfcn.h with CAIRO_HAS_DLSYM + +--- +diff --git a/configure.ac b/configure.ac +index cedfebe..5d2e6ec 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -52,6 +52,7 @@ AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes") + if test "x$have_dlsym" = "xyes"; then + AC_DEFINE([CAIRO_HAS_DLSYM], 1, [Define to 1 if dlsym is available]) + fi ++AM_CONDITIONAL(CAIRO_HAS_DLSYM, test "x$have_dlsym" = "xyes") + + dnl =========================================================================== + +diff --git a/util/Makefile.am b/util/Makefile.am +index f202f35..82d0a80 100644 +--- a/util/Makefile.am ++++ b/util/Makefile.am +@@ -12,20 +12,24 @@ endif + + if CAIRO_HAS_TRACE + SUBDIRS += cairo-trace ++if CAIRO_HAS_DLSYM + if CAIRO_HAS_SCRIPT_SURFACE + if CAIRO_HAS_TEE_SURFACE + SUBDIRS += cairo-fdr + endif + endif + endif ++endif + + if BUILD_SPHINX ++if CAIRO_HAS_DLSYM + if CAIRO_HAS_SCRIPT_SURFACE + if CAIRO_HAS_TEE_SURFACE + SUBDIRS += cairo-sphinx + endif + endif + endif ++endif + + AM_CPPFLAGS = -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ +-- +cgit v0.9.0.2-2-gbebe +From c7b86ab97be1d3d3ccf43b652832f148a2fcf290 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Tue, 10 Apr 2012 13:04:05 +0000 +Subject: any2ppm: fix missing enumeration warning + +--- +diff --git a/test/any2ppm.c b/test/any2ppm.c +index 6b61c47..2403347 100644 +--- a/test/any2ppm.c ++++ b/test/any2ppm.c +@@ -193,6 +193,7 @@ write_ppm (cairo_surface_t *surface, int fd) + break; + case CAIRO_FORMAT_A1: + case CAIRO_FORMAT_RGB16_565: ++ case CAIRO_FORMAT_RGB30: + case CAIRO_FORMAT_INVALID: + default: + return "unhandled image format"; +-- +cgit v0.9.0.2-2-gbebe +From 09de481ce5f6ed1c38c0d5bf3af7c60642c4c947 Mon Sep 17 00:00:00 2001 +From: Gilles Espinasse +Date: Sat, 07 Apr 2012 21:09:51 +0000 +Subject: Cosmetic configure fix + +'how to allow undefined symbols in shared libraries' test should use CAIRO_CC_TRY_FLAG_SILENT or configure display is a bit out of order like this + +checking how to allow undefined symbols in shared libraries used by test suite... checking whether gcc supports -Wl,--allow-shlib-undefined... yes +-Wl,--allow-shlib-undefined + +Signed-off-by: Gilles Espinasse +Signed-off-by: Uli Schlachter +--- +diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings +index f1b17f4..3b2c6f3 100644 +--- a/build/configure.ac.warnings ++++ b/build/configure.ac.warnings +@@ -89,7 +89,7 @@ AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result], + + dnl check linker flags + AC_CACHE_CHECK([how to allow undefined symbols in shared libraries used by test suite], cairo_cv_test_undefined_ldflags, +- [CAIRO_CC_TRY_FLAG([-Wl,--allow-shlib-undefined], [], ++ [CAIRO_CC_TRY_FLAG_SILENT([-Wl,--allow-shlib-undefined], [], + [cairo_cv_test_undefined_ldflags="-Wl,--allow-shlib-undefined]")]) + CAIRO_TEST_UNDEFINED_LDFLAGS="$cairo_cv_test_undefined_ldflags" + AC_SUBST(CAIRO_TEST_UNDEFINED_LDFLAGS) +-- +cgit v0.9.0.2-2-gbebe +From 07fc63676dfdaa57ed919ad7be8f59c97c615473 Mon Sep 17 00:00:00 2001 +From: Uli Schlachter +Date: Wed, 11 Apr 2012 19:37:55 +0000 +Subject: xlib: Disable fallback compositor with xlib-xcb + +When xlib-xcb is enabled, this is just dead code which is never used. Thus, this +shouldn't hurt. However, this does include cairo-xlib-private.h. Shouldn't be a +problem? Well, that header contains static inline functions which some compiler +on Solaris will emit even when they are unused. + +This brings us to the real problem: That static inline function refers to a +function which isn't compiled with xlib-xcb and thus linking fails with +undefined symbols. + +This can be reproduced with GCC by adding a call to +_cairo_xlib_screen_put_gc(NULL, NULL, 0, 0); to +_cairo_xlib_fallback_compositor_get. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48489 +Signed-off-by: Uli Schlachter +--- +diff --git a/src/cairo-xlib-fallback-compositor.c b/src/cairo-xlib-fallback-compositor.c +index 5391926..7d45cd1 100644 +--- a/src/cairo-xlib-fallback-compositor.c ++++ b/src/cairo-xlib-fallback-compositor.c +@@ -42,6 +42,8 @@ + + #include "cairoint.h" + ++#if !CAIRO_HAS_XLIB_XCB_FUNCTIONS ++ + #include "cairo-xlib-private.h" + + #include "cairo-compositor-private.h" +@@ -52,3 +54,5 @@ _cairo_xlib_fallback_compositor_get (void) + /* XXX Do something interesting here to mitigate fallbacks ala xcb */ + return &_cairo_fallback_compositor; + } ++ ++#endif /* !CAIRO_HAS_XLIB_XCB_FUNCTIONS */ +-- +cgit v0.9.0.2-2-gbebe diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD index 9db3fd9bc..e49fd1a34 100644 --- a/extra/dovecot/PKGBUILD +++ b/extra/dovecot/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 157092 2012-04-23 16:33:36Z andyrtr $ +# $Id: PKGBUILD 158862 2012-05-12 13:27:15Z andyrtr $ # Maintainer: Andreas Radke # Contributor: Paul Mattal # Contributor: Federico Quagliata (quaqo) # Contributor: GARETTE Emmanuel pkgname=dovecot -pkgver=2.1.5 +pkgver=2.1.6 pkgrel=1 pkgdesc="An IMAP and POP3 server written with security primarily in mind" arch=('i686' 'x86_64') @@ -20,8 +20,8 @@ provides=('imap-server' 'pop3-server') options=('!libtool') install=$pkgname.install source=(http://dovecot.org/releases/2.1/${pkgname}-${pkgver}.tar.gz{,.sig} dovecot.sh) -md5sums=('c857e3442f2f14b3e46f1154b13b0b4b' - '4ef0a9647b82e0a1bdc667492a151881' +md5sums=('56d2a8d5273d39caa41d6a8dd9f4442c' + 'f4eed12984b9ddf6eea37fc9f1828af8' '587159e84e2da6f83d70b3c706ba87cc') build() { diff --git a/extra/gtk3/PKGBUILD b/extra/gtk3/PKGBUILD index 48779accb..36f89960c 100644 --- a/extra/gtk3/PKGBUILD +++ b/extra/gtk3/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 158335 2012-05-03 17:45:08Z heftig $ +# $Id: PKGBUILD 158899 2012-05-12 20:17:26Z ibiru $ # Maintainer: Ionut Biru pkgname=gtk3 -pkgver=3.4.2 -pkgrel=2 +pkgver=3.4.3 +pkgrel=1 pkgdesc="GObject-based multi-platform GUI toolkit (v3)" arch=('i686' 'x86_64') url="http://www.gtk.org/" @@ -15,7 +15,7 @@ backup=(etc/gtk-3.0/settings.ini) license=('LGPL') source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-$pkgver.tar.xz settings.ini wacom.patch) -sha256sums=('b1ab72bc61434418160ff0c7edfd93c74758ed8a35e2ed3d07e3e218c2705480' +sha256sums=('846010442a96590469cde16ed6a1fdfe09397e435165459f04d31cfa5713799f' 'c214d3dcdcadda3d642112287524ab3e526ad592b70895c9f3e3733c23701621' '86bda95a14a99d0f596c4ecb2ed715689f71c207c65dfc90a39d4ae7f1c0c0f5') build() { diff --git a/extra/gvfs/PKGBUILD b/extra/gvfs/PKGBUILD index d4911ea95..0d8828adf 100644 --- a/extra/gvfs/PKGBUILD +++ b/extra/gvfs/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 157347 2012-04-27 16:15:04Z ibiru $ +# $Id: PKGBUILD 158913 2012-05-13 02:45:39Z eric $ # Maintainer: Jan de Groot pkgbase=gvfs @@ -10,11 +10,14 @@ license=('LGPL') makedepends=('avahi' 'bluez' 'dbus-glib' 'fuse' 'intltool' 'libarchive' 'libcdio' 'libgphoto2' 'libimobiledevice' 'libsoup-gnome' 'smbclient' 'udisks2') url="http://www.gnome.org" options=(!libtool) -source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz) -sha256sums=('998b9d0089d21e451e455b6bc5f421eb08bcb3e5ff0aceda98e424cc42ef6616') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz + gvfs-1.12.2-afp-g_clear_object.patch) +sha256sums=('998b9d0089d21e451e455b6bc5f421eb08bcb3e5ff0aceda98e424cc42ef6616' + '6a93963644317d9e55aebac723008bd94cf97d42349dbf48ab6996fa5d9eed89') build() { cd "$pkgbase-$pkgver" + patch -p1 -i ../gvfs-1.12.2-afp-g_clear_object.patch ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --disable-static \ --libexecdir=/usr/lib/gvfs \ diff --git a/extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch b/extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch new file mode 100644 index 000000000..09e11d888 --- /dev/null +++ b/extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch @@ -0,0 +1,35 @@ +From 01161473ed33ee682f340e6f12edcba5334475e0 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Mon, 30 Apr 2012 06:09:30 -0400 +Subject: [PATCH] afp: Use g_clear_object properly + +g_clear_object expects the address of a pointer. A recent +change in its definition makes gcc complain about this. +(cherry picked from commit 7fe5deeae25f2396027f667d8960d2ec84c64716) +--- + daemon/gvfsafpvolume.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/daemon/gvfsafpvolume.c b/daemon/gvfsafpvolume.c +index 3fd33f2..5207459 100644 +--- a/daemon/gvfsafpvolume.c ++++ b/daemon/gvfsafpvolume.c +@@ -1082,7 +1082,7 @@ create_directory_get_filedir_parms_cb (GObject *source_object, GAsyncResult *res + return; + + error: +- g_clear_object (info); ++ g_clear_object (&info); + g_simple_async_result_take_error (simple, err); + g_simple_async_result_complete (simple); + g_object_unref (simple); +@@ -3033,4 +3033,4 @@ g_vfs_afp_volume_read_from_fork_finish (GVfsAfpVolume *volume, + *bytes_read = g_simple_async_result_get_op_res_gssize (simple); + + return TRUE; +-} +\ No newline at end of file ++} +-- +1.7.8.6 + diff --git a/extra/libvpx/PKGBUILD b/extra/libvpx/PKGBUILD index 66834c06c..09c994f21 100644 --- a/extra/libvpx/PKGBUILD +++ b/extra/libvpx/PKGBUILD @@ -1,7 +1,7 @@ -# $Id: PKGBUILD 149274 2012-02-06 17:33:28Z ibiru $ +# $Id: PKGBUILD 158895 2012-05-12 18:37:10Z ibiru $ # Maintainer: Ionut Biru pkgname=libvpx -pkgver=1.0.0 +pkgver=1.1.0 pkgrel=1 pkgdesc="The VP8 Codec SDK" arch=('i686' 'x86_64') @@ -10,10 +10,10 @@ license=('BSD') depends=('glibc') makedepends=('yasm') source=(http://webm.googlecode.com/files/$pkgname-v$pkgver.tar.bz2) -sha1sums=('2919e11074fef72fc61ef1a75160050ffaad6074') +sha1sums=('356af5f770c50cd021c60863203d8f30164f6021') build() { - cd "$srcdir/$pkgname-v$pkgver" + cd "$pkgname-v$pkgver" ./configure --prefix=/usr --enable-vp8 \ --enable-runtime-cpu-detect \ --enable-shared \ @@ -25,7 +25,7 @@ build() { } package() { - cd "$srcdir/$pkgname-v$pkgver" + cd "$pkgname-v$pkgver" make DIST_DIR="$pkgdir/usr" install install -D -m 0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/extra/libxi/PKGBUILD b/extra/libxi/PKGBUILD index e242b28ab..045880e34 100644 --- a/extra/libxi/PKGBUILD +++ b/extra/libxi/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 153296 2012-03-12 20:52:30Z andyrtr $ +# $Id: PKGBUILD 158868 2012-05-12 16:25:29Z andyrtr $ # Maintainer: Jan de Groot pkgname=libxi -pkgver=1.6.0 +pkgver=1.6.1 pkgrel=1 pkgdesc="X11 Input extension library" arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ makedepends=('pkgconfig' 'xorg-util-macros') options=(!libtool) license=('custom') source=(${url}/releases/individual/lib/libXi-${pkgver}.tar.bz2) -sha1sums=('b7edf48f93e8abd13ca688fa7f597452c4b74346') +sha1sums=('4b53b41fdaa3acc86606c696c68d5eed11454612') build() { cd "${srcdir}/libXi-${pkgver}" diff --git a/extra/mpg123/PKGBUILD b/extra/mpg123/PKGBUILD index 354982b8b..244dcb380 100644 --- a/extra/mpg123/PKGBUILD +++ b/extra/mpg123/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 158702 2012-05-08 04:10:15Z eric $ +# $Id: PKGBUILD 158903 2012-05-12 20:49:50Z eric $ # Maintainer: Eric Bélanger pkgname=mpg123 -pkgver=1.14.1 +pkgver=1.14.2 pkgrel=1 pkgdesc="A console based real time MPEG Audio Player for Layer 1, 2 and 3" arch=('i686' 'x86_64') @@ -17,8 +17,8 @@ conflicts=('mpg321') provides=('mpg321') options=('!libtool') source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig}) -sha1sums=('db1004f3318ce239e2972ae623563fe6e831e331' - '9e88254e099ff08ff8eb5bb7e8697ec5b5a2b825') +sha1sums=('887a453e49e3d49d539a712ee66a8d9da16e3325' + '878c6ca9e8fb9f29f34953d8fe39d01411086baf') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/nx/PKGBUILD b/extra/nx/PKGBUILD index 664358563..5807ad4a0 100644 --- a/extra/nx/PKGBUILD +++ b/extra/nx/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 157433 2012-04-28 09:58:35Z andyrtr $ +# $Id: PKGBUILD 158856 2012-05-12 13:09:28Z andyrtr $ # Maintainer: Andreas Radke pkgbase=nx pkgname=('libxcomp' 'nxproxy' 'nx-x11' 'nx-xcompext' 'nxagent' 'nx-headers') -pkgver=3.5.0.12 -pkgrel=2 +pkgver=3.5.0.13 +pkgrel=1 arch=('i686' 'x86_64') url="http://wiki.x2go.org/" license=('GPL') @@ -14,7 +14,7 @@ makedepends=('libjpeg-turbo' 'libpng' 'bash' 'perl' # runtime dependencies from ) source=(http://code.x2go.org/releases/source/nx-libs/nx-libs_$pkgver-full.tar.gz nx-x11.ld.so.conf.d) -md5sums=('a2011e034a318016cf2260c30a567301' +md5sums=('2c80e570d35a25989f8606e1f3620026' 'f2ec60c7e2d81bef2f7292d2b33681a6') build() { diff --git a/extra/taglib/PKGBUILD b/extra/taglib/PKGBUILD index c83494e46..38de56173 100644 --- a/extra/taglib/PKGBUILD +++ b/extra/taglib/PKGBUILD @@ -1,9 +1,10 @@ -# $Id: PKGBUILD 154265 2012-03-25 08:45:02Z eric $ -# Maintainer: Andrea Scarpino +# $Id: PKGBUILD 158844 2012-05-12 11:47:35Z tomegun $ +# Maintainer: Tom Gundersen +# Contributor: Andrea Scarpino # Contributor: Tobias Powalowski pkgname=taglib -pkgver=1.7.1 +pkgver=1.7.2 pkgrel=1 pkgdesc="A Library for reading and editing the meta-data of several popular audio formats" arch=('i686' 'x86_64') @@ -14,8 +15,6 @@ makedepends=('cmake' 'pkg-config') options=('!libtool') source=("http://developer.kde.org/~wheeler/files/src/$pkgname-$pkgver.tar.gz" 'ape-idev2.patch') -sha1sums=('bafe0958eb884981cade83d45c18ee34165479b8' - '9bdae5c2da6bb4e1a2ea38a5a587773b850c3518') build() { cd "${srcdir}"/${pkgname}-${pkgver} @@ -36,3 +35,5 @@ package() { cd "${srcdir}"/build make DESTDIR="${pkgdir}" install } +md5sums=('b0a9e797d3833fb933c7c3176de3d720' + 'c7c165d99acf01456351ba39ff7056cb') diff --git a/extra/xf86-input-synaptics/PKGBUILD b/extra/xf86-input-synaptics/PKGBUILD index 4c973c4a5..9900010da 100644 --- a/extra/xf86-input-synaptics/PKGBUILD +++ b/extra/xf86-input-synaptics/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 157345 2012-04-27 12:08:41Z andyrtr $ +# $Id: PKGBUILD 158878 2012-05-12 16:51:09Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Tobias Powalowski # Contributor: Thomas Bächler # Contributor: Alexander Baldeck pkgname=xf86-input-synaptics -pkgver=1.5.99.904 +pkgver=1.6.1 pkgrel=1 pkgdesc="Synaptics driver for notebook touchpads" arch=('i686' 'x86_64') @@ -22,7 +22,7 @@ options=(!libtool) backup=('etc/X11/xorg.conf.d/10-synaptics.conf') source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 10-synaptics.conf) -sha1sums=('4853bd933fa41b83ff513262cdf6e5b89f22d64b' +sha1sums=('963276a5dd240e84efff28d516f8d23cfeedaa13' '68e1f4ef5e1038231d210eb422fa4d18c5922f0f') build() { diff --git a/extra/xf86-input-wacom/PKGBUILD b/extra/xf86-input-wacom/PKGBUILD index 9fb79abff..07fabd1ee 100644 --- a/extra/xf86-input-wacom/PKGBUILD +++ b/extra/xf86-input-wacom/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 158636 2012-05-05 03:31:18Z allan $ +# $Id: PKGBUILD 158905 2012-05-12 20:58:34Z andyrtr $ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Jan de Groot # Contributor: M Rawash pkgname=xf86-input-wacom -pkgver=0.14.0 -pkgrel=2 +pkgver=0.15.0 +pkgrel=1 pkgdesc="X.Org Wacom tablet driver" arch=('i686' 'x86_64') url="http://linuxwacom.sourceforge.net/" @@ -17,8 +17,8 @@ conflicts=('xorg-server<1.12.0') options=(!libtool) source=(http://downloads.sourceforge.net/project/linuxwacom/${pkgname}/${pkgname}-${pkgver}.tar.bz2 70-wacom.rules) -md5sums=('23d19a2b50a86b848df17297c745144f' - '10db4f8272286690255c1bcc18bfdd92') +sha1sums=('6e8e4fa2ccc2448cae97119c6f2842fe283f9b29' + '7cebb94459f9cf49693e65215f3af59cea5e2b73') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/xf86-video-apm/PKGBUILD b/extra/xf86-video-apm/PKGBUILD index 3cf6acff0..2914e15fc 100644 --- a/extra/xf86-video-apm/PKGBUILD +++ b/extra/xf86-video-apm/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 153319 2012-03-12 20:53:08Z andyrtr $ +# $Id: PKGBUILD 158880 2012-05-12 17:20:17Z andyrtr $ # Maintainer: Jan de Groot pkgname=xf86-video-apm -pkgver=1.2.3 -pkgrel=5 +pkgver=1.2.4 +pkgrel=1 pkgdesc="X.org Alliance ProMotion video driver" arch=(i686 x86_64) url="http://xorg.freedesktop.org/" @@ -13,14 +13,11 @@ makedepends=('xorg-server-devel>=1.11.99.902') conflicts=('xorg-server<1.11.99.902') groups=('xorg-drivers' 'xorg') options=('!libtool') -source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 - apm-1.2.3-git.patch) -sha1sums=('1fa7180cf985a74132f8d5b39a0bf9df08713fac' - 'ad9468519eb959bb879ba4e4993d6a83848d5c6f') +source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) +sha1sums=('d792ba6e8c39e60e00e0790b4e08f551044b2f7c') build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i ${srcdir}/apm-1.2.3-git.patch ./configure --prefix=/usr make } diff --git a/extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch b/extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch new file mode 100644 index 000000000..bcfbf94db --- /dev/null +++ b/extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch @@ -0,0 +1,571 @@ +From 837149c63929d7d5a8ef6f8204d396f8e6d5acd7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Fri, 13 Apr 2012 11:12:51 +0200 +Subject: [PATCH 1/4] Poor man's acceleration of solid pictures for R3xx-R7xx + +The patch below implements basic acceleration of solid pictures via +scratch 1x1 pixmaps. It seems to at least alleviate some of the +corruption and performance issues exposed by Cairo 1.12, and should also +improve performance for other toolkits/apps using solid pictures. + +If there are no objections to this approach, maybe someone else can beat +me to extending this for Evergreen+ and R1/2xx. +--- + src/r600_exa.c | 160 ++++++++++++++++++++++++++-------------------- + src/radeon_exa_render.c | 115 ++++++++++++++++++++-------------- + src/radeon_exa_shared.c | 19 ++++++ + src/radeon_exa_shared.h | 1 + + 4 files changed, 179 insertions(+), 116 deletions(-) + +diff --git a/src/r600_exa.c b/src/r600_exa.c +index e1eb62f..c3ae553 100644 +--- a/src/r600_exa.c ++++ b/src/r600_exa.c +@@ -901,17 +901,8 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict, + int op, + int unit) + { +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; + unsigned int i; +- int max_tex_w, max_tex_h; +- +- max_tex_w = 8192; +- max_tex_h = 8192; +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) { + if (R600TexFormats[i].fmt == pPict->format) +@@ -951,9 +942,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + unsigned int i; + tex_resource_t tex_res; + tex_sampler_t tex_samp; +@@ -969,9 +958,16 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + } + + /* Texture */ ++ if (pPict->pDrawable) { ++ tex_res.w = pPict->pDrawable->width; ++ tex_res.h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ tex_res.w = 1; ++ tex_res.h = 1; ++ repeatType = RepeatNormal; ++ } + tex_res.id = unit; +- tex_res.w = w; +- tex_res.h = h; + tex_res.pitch = accel_state->src_obj[unit].pitch; + tex_res.depth = 0; + tex_res.dim = SQ_TEX_DIM_2D; +@@ -1170,24 +1166,24 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + vs_alu_consts[0] = xFixedToFloat(pPict->transform->matrix[0][0]); + vs_alu_consts[1] = xFixedToFloat(pPict->transform->matrix[0][1]); + vs_alu_consts[2] = xFixedToFloat(pPict->transform->matrix[0][2]); +- vs_alu_consts[3] = 1.0 / w; ++ vs_alu_consts[3] = 1.0 / tex_res.w; + + vs_alu_consts[4] = xFixedToFloat(pPict->transform->matrix[1][0]); + vs_alu_consts[5] = xFixedToFloat(pPict->transform->matrix[1][1]); + vs_alu_consts[6] = xFixedToFloat(pPict->transform->matrix[1][2]); +- vs_alu_consts[7] = 1.0 / h; ++ vs_alu_consts[7] = 1.0 / tex_res.h; + } else { + accel_state->is_transform[unit] = FALSE; + + vs_alu_consts[0] = 1.0; + vs_alu_consts[1] = 0.0; + vs_alu_consts[2] = 0.0; +- vs_alu_consts[3] = 1.0 / w; ++ vs_alu_consts[3] = 1.0 / tex_res.w; + + vs_alu_consts[4] = 0.0; + vs_alu_consts[5] = 1.0; + vs_alu_consts[6] = 0.0; +- vs_alu_consts[7] = 1.0 / h; ++ vs_alu_consts[7] = 1.0 / tex_res.h; + } + + /* VS alu constants */ +@@ -1202,33 +1198,30 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + { + uint32_t tmp1; + PixmapPtr pSrcPixmap, pDstPixmap; +- int max_tex_w, max_tex_h, max_dst_w, max_dst_h; + + /* Check for unsupported compositing operations. */ + if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0]))) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); + +- max_tex_w = 8192; +- max_tex_h = 8192; +- max_dst_w = 8192; +- max_dst_h = 8192; ++ if (pSrcPixmap->drawable.width >= 8192 || ++ pSrcPixmap->drawable.height >= 8192) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } + +- if (pSrcPixmap->drawable.width >= max_tex_w || +- pSrcPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } ++ if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) ++ return FALSE; ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + +- if (pDstPixmap->drawable.width >= max_dst_w || +- pDstPixmap->drawable.height >= max_dst_h) { ++ if (pDstPixmap->drawable.width >= 8192 || ++ pDstPixmap->drawable.height >= 8192) { + RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", + pDstPixmap->drawable.width, + pDstPixmap->drawable.height)); +@@ -1237,38 +1230,35 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); +- +- if (pMaskPixmap->drawable.width >= max_tex_w || +- pMaskPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width >= 8192 || ++ pMaskPixmap->drawable.height >= 8192) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } + +- if (pMaskPicture->componentAlpha) { +- /* Check if it's component alpha that relies on a source alpha and +- * on the source value. We can only get one of those into the +- * single source value that we get to blend with. +- */ +- if (R600BlendOp[op].src_alpha && +- (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != +- (BLEND_ZERO << COLOR_SRCBLEND_shift)) { +- RADEON_FALLBACK(("Component alpha not supported with source " +- "alpha and source value blending.\n")); ++ if (pMaskPicture->componentAlpha) { ++ /* Check if it's component alpha that relies on a source alpha and ++ * on the source value. We can only get one of those into the ++ * single source value that we get to blend with. ++ */ ++ if (R600BlendOp[op].src_alpha && ++ (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != ++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) { ++ RADEON_FALLBACK(("Component alpha not supported with source " ++ "alpha and source value blending.\n")); ++ } + } +- } + +- if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) +- return FALSE; ++ if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) ++ return FALSE; ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + } + +- if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) +- return FALSE; +- + if (!R600GetDestFormat(pDstPicture, &tmp1)) + return FALSE; + +@@ -1280,7 +1270,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; + uint32_t dst_format; +@@ -1288,15 +1279,21 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + shader_config_t vs_conf, ps_conf; + struct r600_accel_object src_obj, mask_obj, dst_obj; + +- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8) ++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) + return FALSE; + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + #if defined(XF86DRM_MODE) + if (info->cs) { + src_obj.offset = 0; + dst_obj.offset = 0; +- src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.bo = radeon_get_pixmap_bo(pDst); ++ src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); + src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); + dst_obj.surface = radeon_get_pixmap_surface(pDst); +@@ -1322,7 +1319,16 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + dst_obj.bpp = pDst->drawable.bitsPerPixel; + dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; + +- if (pMask) { ++ if (pMaskPicture) { ++ if (!pMask) { ++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + #if defined(XF86DRM_MODE) + if (info->cs) { + mask_obj.offset = 0; +@@ -1509,11 +1515,9 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void R600DoneComposite(PixmapPtr pDst) ++static void R600FinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, ++ struct radeon_accel_state *accel_state) + { +- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; +- RADEONInfoPtr info = RADEONPTR(pScrn); +- struct radeon_accel_state *accel_state = info->accel_state; + int vtx_size; + + if (accel_state->vsync) +@@ -1527,6 +1531,22 @@ static void R600DoneComposite(PixmapPtr pDst) + r600_finish_op(pScrn, vtx_size); + } + ++static void R600DoneComposite(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ R600FinishComposite(pScrn, pDst, accel_state); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} ++ + static void R600Composite(PixmapPtr pDst, + int srcX, int srcY, + int maskX, int maskY, +@@ -1543,7 +1563,7 @@ static void R600Composite(PixmapPtr pDst, + + #ifdef XF86DRM_MODE + if (info->cs && CS_FULL(info->cs)) { +- R600DoneComposite(info->accel_state->dst_pix); ++ R600FinishComposite(pScrn, pDst, info->accel_state); + radeon_cs_flush_indirect(pScrn); + R600PrepareComposite(info->accel_state->composite_op, + info->accel_state->src_pic, +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index e5c231f..b6cc9e4 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -299,8 +299,8 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict, + if (repeatType == RepeatNormal || repeatType == RepeatReflect) { + Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix); + +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; ++ int w = pPict->pDrawable ? pPict->pDrawable->width : 1; ++ int h = pPict->pDrawable ? pPict->pDrawable->height : 1; + + if (pPict->transform) { + if (badPitch) +@@ -1112,23 +1112,8 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, + ScreenPtr pScreen = pDstPict->pDrawable->pScreen; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); +- + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; +- int max_tex_w, max_tex_h; +- +- if (is_r500) { +- max_tex_w = 4096; +- max_tex_h = 4096; +- } else { +- max_tex_w = 2048; +- max_tex_h = 2048; +- } +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++) + { +@@ -1139,7 +1124,7 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) { ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) { + if (info->cs) { + struct radeon_exa_pixmap_priv *driver_priv; + PixmapPtr pPix; +@@ -1181,15 +1166,23 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat0, txformat1, txoffset, txpitch, us_format = 0; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; ++ int w, h; + int i, pixel_shift, out_size = 6; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + + TRACE; + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ + txpitch = exaGetPixmapPitch(pPix); + txoffset = 0; + +@@ -1394,11 +1387,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- + if (IS_R500_3D) { + max_tex_w = 4096; + max_tex_h = 4096; +@@ -1416,13 +1404,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + } + } + +- if (pSrcPixmap->drawable.width > max_tex_w || +- pSrcPixmap->drawable.height > max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > max_dst_w || +@@ -1432,20 +1413,32 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > max_tex_w || ++ pSrcPixmap->drawable.height > max_tex_h) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); +- +- if (pMaskPixmap->drawable.width > max_tex_w || +- pMaskPixmap->drawable.height > max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > max_tex_w || ++ pMaskPixmap->drawable.height > max_tex_h) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -1479,7 +1472,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch; + uint32_t txenable, colorpitch; + uint32_t blendcntl, output_fmt; +@@ -1508,9 +1502,24 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +@@ -2132,7 +2141,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) ++static void FUNC_NAME(RadeonFinishComposite)(PixmapPtr pDst) + { + RINFO_FROM_SCREEN(pDst->drawable.pScreen); + ACCEL_PREAMBLE(); +@@ -2179,6 +2188,20 @@ static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) + LEAVE_DRAW(0); + } + ++static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ FUNC_NAME(RadeonFinishComposite)(pDst); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} + + #ifdef ACCEL_CP + +@@ -2257,7 +2280,7 @@ static void FUNC_NAME(RadeonCompositeTile)(ScrnInfoPtr pScrn, + if ((info->cs && CS_FULL(info->cs)) || + (!info->cs && (info->cp->indirectBuffer->used + 4 * 32) > + info->cp->indirectBuffer->total)) { +- FUNC_NAME(RadeonDoneComposite)(info->accel_state->dst_pix); ++ FUNC_NAME(RadeonFinishComposite)(info->accel_state->dst_pix); + if (info->cs) + radeon_cs_flush_indirect(pScrn); + else +diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c +index be1d2fa..28dc335 100644 +--- a/src/radeon_exa_shared.c ++++ b/src/radeon_exa_shared.c +@@ -126,6 +126,25 @@ Bool RADEONCheckBPP(int bpp) + return FALSE; + } + ++PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) ++{ ++ PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0); ++ struct radeon_bo *bo; ++ ++ exaMoveInPixmap(pPix); ++ bo = radeon_get_pixmap_bo(pPix); ++ ++ if (radeon_bo_map(bo, 1)) { ++ pScreen->DestroyPixmap(pPix); ++ return NULL; ++ } ++ ++ memcpy(bo->ptr, &solid, 4); ++ radeon_bo_unmap(bo); ++ ++ return pPix; ++} ++ + static Bool radeon_vb_get(ScrnInfoPtr pScrn) + { + RADEONInfoPtr info = RADEONPTR(pScrn); +diff --git a/src/radeon_exa_shared.h b/src/radeon_exa_shared.h +index 7b8b5ca..60a1045 100644 +--- a/src/radeon_exa_shared.h ++++ b/src/radeon_exa_shared.h +@@ -40,6 +40,7 @@ extern void RADEONVlineHelperClear(ScrnInfoPtr pScrn); + extern void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); + extern Bool RADEONValidPM(uint32_t pm, int bpp); + extern Bool RADEONCheckBPP(int bpp); ++extern PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid); + + #define RADEON_TRACE_FALL 0 + #define RADEON_TRACE_DRAW 0 +-- +1.7.7.5 + diff --git a/extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch b/extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch new file mode 100644 index 000000000..e6b5433e1 --- /dev/null +++ b/extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch @@ -0,0 +1,290 @@ +From 761ef4b340e689490a76ec5ce520c858335e2106 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Sat, 14 Apr 2012 08:53:39 -0400 +Subject: [PATCH] poor man's solid picture support for evergreen + +Signed-off-by: Alex Deucher +--- + src/evergreen_exa.c | 163 ++++++++++++++++++++++++++++++--------------------- + 1 files changed, 95 insertions(+), 68 deletions(-) + +diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c +index cee3ec2..61b47a4 100644 +--- a/src/evergreen_exa.c ++++ b/src/evergreen_exa.c +@@ -748,17 +748,8 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict, + int op, + int unit) + { +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; + unsigned int i; +- int max_tex_w, max_tex_h; +- +- max_tex_w = 16384; +- max_tex_h = 16384; +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) { + if (EVERGREENTexFormats[i].fmt == pPict->format) +@@ -798,9 +789,16 @@ static void EVERGREENXFormSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int const_offset = unit * 8; ++ int w, h; ++ ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ } else { ++ w = 1; ++ h = 1; ++ } + + if (pPict->transform != 0) { + accel_state->is_transform[unit] = TRUE; +@@ -837,9 +835,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + unsigned int i; + tex_resource_t tex_res; + tex_sampler_t tex_samp; +@@ -854,9 +850,17 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, + } + + /* Texture */ ++ if (pPict->pDrawable) { ++ tex_res.w = pPict->pDrawable->width; ++ tex_res.h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ tex_res.w = 1; ++ tex_res.h = 1; ++ repeatType = RepeatNormal; ++ } ++ + tex_res.id = unit; +- tex_res.w = w; +- tex_res.h = h; + tex_res.pitch = accel_state->src_obj[unit].pitch; + tex_res.depth = 0; + tex_res.dim = SQ_TEX_DIM_2D; +@@ -1054,33 +1058,30 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, + { + uint32_t tmp1; + PixmapPtr pSrcPixmap, pDstPixmap; +- int max_tex_w, max_tex_h, max_dst_w, max_dst_h; + + /* Check for unsupported compositing operations. */ + if (op >= (int) (sizeof(EVERGREENBlendOp) / sizeof(EVERGREENBlendOp[0]))) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); + +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- max_tex_w = 8192; +- max_tex_h = 8192; +- max_dst_w = 8192; +- max_dst_h = 8192; ++ if (pSrcPixmap->drawable.width >= 16384 || ++ pSrcPixmap->drawable.height >= 16384) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } + +- if (pSrcPixmap->drawable.width >= max_tex_w || +- pSrcPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } ++ if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) ++ return FALSE; ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + +- if (pDstPixmap->drawable.width >= max_dst_w || +- pDstPixmap->drawable.height >= max_dst_h) { ++ if (pDstPixmap->drawable.width >= 16384 || ++ pDstPixmap->drawable.height >= 16384) { + RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", + pDstPixmap->drawable.width, + pDstPixmap->drawable.height)); +@@ -1089,38 +1090,35 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width >= max_tex_w || +- pMaskPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width >= 16384 || ++ pMaskPixmap->drawable.height >= 16384) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } + +- if (pMaskPicture->componentAlpha) { +- /* Check if it's component alpha that relies on a source alpha and +- * on the source value. We can only get one of those into the +- * single source value that we get to blend with. +- */ +- if (EVERGREENBlendOp[op].src_alpha && +- (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != +- (BLEND_ZERO << COLOR_SRCBLEND_shift)) { +- RADEON_FALLBACK(("Component alpha not supported with source " +- "alpha and source value blending.\n")); ++ if (pMaskPicture->componentAlpha) { ++ /* Check if it's component alpha that relies on a source alpha and ++ * on the source value. We can only get one of those into the ++ * single source value that we get to blend with. ++ */ ++ if (EVERGREENBlendOp[op].src_alpha && ++ (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != ++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) { ++ RADEON_FALLBACK(("Component alpha not supported with source " ++ "alpha and source value blending.\n")); ++ } + } +- } + +- if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) +- return FALSE; ++ if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) ++ return FALSE; ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + } + +- if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) +- return FALSE; +- + if (!EVERGREENGetDestFormat(pDstPicture, &tmp1)) + return FALSE; + +@@ -1132,7 +1130,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; + uint32_t dst_format; +@@ -1142,13 +1141,19 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + struct r600_accel_object src_obj, mask_obj, dst_obj; + float *cbuf; + +- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8) ++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) + return FALSE; + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + src_obj.offset = 0; + dst_obj.offset = 0; +- src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.bo = radeon_get_pixmap_bo(pDst); ++ src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.surface = radeon_get_pixmap_surface(pDst); + src_obj.surface = radeon_get_pixmap_surface(pSrc); + dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); +@@ -1166,7 +1171,15 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + dst_obj.bpp = pDst->drawable.bitsPerPixel; + dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; + +- if (pMask) { ++ if (pMaskPicture) { ++ if (!pMask) { ++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } + mask_obj.offset = 0; + mask_obj.bo = radeon_get_pixmap_bo(pMask); + mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask); +@@ -1363,11 +1376,9 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void EVERGREENDoneComposite(PixmapPtr pDst) ++static void EVERGREENFinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, ++ struct radeon_accel_state *accel_state) + { +- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; +- RADEONInfoPtr info = RADEONPTR(pScrn); +- struct radeon_accel_state *accel_state = info->accel_state; + int vtx_size; + + if (accel_state->vsync) +@@ -1381,6 +1392,22 @@ static void EVERGREENDoneComposite(PixmapPtr pDst) + evergreen_finish_op(pScrn, vtx_size); + } + ++static void EVERGREENDoneComposite(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ EVERGREENFinishComposite(pScrn, pDst, accel_state); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} ++ + static void EVERGREENComposite(PixmapPtr pDst, + int srcX, int srcY, + int maskX, int maskY, +@@ -1393,7 +1420,7 @@ static void EVERGREENComposite(PixmapPtr pDst, + float *vb; + + if (CS_FULL(info->cs)) { +- EVERGREENDoneComposite(info->accel_state->dst_pix); ++ EVERGREENFinishComposite(pScrn, pDst, info->accel_state); + radeon_cs_flush_indirect(pScrn); + EVERGREENPrepareComposite(info->accel_state->composite_op, + info->accel_state->src_pic, +-- +1.7.7.5 + diff --git a/extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch b/extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch new file mode 100644 index 000000000..3a2779446 --- /dev/null +++ b/extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch @@ -0,0 +1,182 @@ +From f36b911ecc31f689ddceeeb11d10eb7cb4a3428d Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 13 Apr 2012 13:24:46 -0400 +Subject: [PATCH 2/3] poor man's solid picture support for r100 + +Signed-off-by: Alex Deucher +--- + src/radeon_exa_render.c | 101 +++++++++++++++++++++++++++-------------------- + 1 files changed, 58 insertions(+), 43 deletions(-) + +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index b6cc9e4..451a625 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -338,17 +338,8 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict, + int unit) + { + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; + +- /* r100 limit should be 2048, there are issues with 2048 +- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed +- */ +- +- if ((w > 2047) || (h > 2047)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); +- + for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) { + if (R100TexFormats[i].fmt == pPict->format) + break; +@@ -357,7 +348,7 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) + return FALSE; + + if (pPict->filter != PictFilterNearest && +@@ -392,15 +383,24 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat, txoffset, txpitch; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && +- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); +- int i; ++ unsigned int repeatType; ++ Bool repeat; ++ int i, w, h; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ ++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && ++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); ++ + txpitch = exaGetPixmapPitch(pPix); + txoffset = 0; + +@@ -510,22 +510,6 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- /* r100 limit should be 2048, there are issues with 2048 +- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed +- */ +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- if (pSrcPixmap->drawable.width > 2047 || +- pSrcPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > 2047 || +@@ -535,20 +519,35 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ /* r100 limit should be 2048, there are issues with 2048 ++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed ++ */ ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > 2047 || ++ pSrcPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width > 2047 || +- pMaskPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > 2047 || ++ pMaskPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -624,7 +623,8 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, + PixmapPtr pMask, + PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch, colorpitch; + uint32_t pp_cntl, blendcntl, cblend, ablend; + int pixel_shift; +@@ -648,12 +648,27 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, + + CHECK_OFFSET(pDst, 0x0f, "destination"); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +-- +1.7.7.5 + diff --git a/extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch b/extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch new file mode 100644 index 000000000..0a448fc93 --- /dev/null +++ b/extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch @@ -0,0 +1,179 @@ +From c5c8310858f8018a1754f2457d7b102dc7d62b23 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 13 Apr 2012 13:28:10 -0400 +Subject: [PATCH 3/3] poor man's solid picture support for r200 + +Signed-off-by: Alex Deucher +--- + src/radeon_exa_render.c | 101 +++++++++++++++++++++++++++-------------------- + 1 files changed, 58 insertions(+), 43 deletions(-) + +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index 451a625..7f1a3ff 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -756,17 +756,8 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict, + int unit) + { + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; + +- /* r200 limit should be 2048, there are issues with 2048 +- * see bug 19269 +- */ +- +- if ((w > 2047) || (h > 2047)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); +- + for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) + { + if (R200TexFormats[i].fmt == pPict->format) +@@ -776,7 +767,7 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) + return FALSE; + + if (pPict->filter != PictFilterNearest && +@@ -809,15 +800,24 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat, txoffset, txpitch; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && +- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); +- int i; ++ unsigned int repeatType; ++ Bool repeat; ++ int i, w, h; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ ++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && ++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); ++ + txpitch = exaGetPixmapPitch(pPix); + + txoffset = 0; +@@ -926,22 +926,6 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- /* r200 limit should be 2048, there are issues with 2048 +- * see bug 19269 +- */ +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- if (pSrcPixmap->drawable.width > 2047 || +- pSrcPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > 2047 || +@@ -951,20 +935,35 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ /* r200 limit should be 2048, there are issues with 2048 ++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed ++ */ ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > 2047 || ++ pSrcPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width > 2047 || +- pMaskPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > 2047 || ++ pMaskPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -997,7 +996,8 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch; + uint32_t pp_cntl, blendcntl, cblend, ablend, colorpitch; + int pixel_shift; +@@ -1024,9 +1024,24 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +-- +1.7.7.5 + diff --git a/extra/xf86-video-ati/PKGBUILD b/extra/xf86-video-ati/PKGBUILD index 09c47f815..341982471 100644 --- a/extra/xf86-video-ati/PKGBUILD +++ b/extra/xf86-video-ati/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 154644 2012-03-30 13:39:00Z andyrtr $ +# $Id: PKGBUILD 158858 2012-05-12 13:09:32Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Alexander Baldeck pkgname=xf86-video-ati pkgver=6.14.4 -pkgrel=2 +pkgrel=4 pkgdesc="X.org ati video driver" arch=('i686' 'x86_64') url="http://xorg.freedesktop.org/" @@ -14,11 +14,30 @@ makedepends=('xorg-server-devel>=1.11.99.902' 'xf86driproto' 'mesa' 'glproto') conflicts=('xorg-server<1.11.99.902') groups=('xorg-drivers' 'xorg') options=('!libtool') -source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) -sha1sums=('75ad000bc00599e1797134f2d20d3094cba6af92') +source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 + git_fixes.diff + 0000-poor-man-s-solid-picture-support-for-r300-r600.patch + 0001-poor-man-s-solid-picture-support-for-evergreen.patch + 0002-poor-man-s-solid-picture-support-for-r100.patch + 0003-poor-man-s-solid-picture-support-for-r200.patch) +sha1sums=('75ad000bc00599e1797134f2d20d3094cba6af92' + '8b774e2f0310075cff2b7d874b0bed38d6245769' + '787f88c428f56ca6e96ba5eaf043a30bddfd0e23' + '69359a6623fe0f2214790c8ad40cac1a680a3825' + 'c0709ab82728e34838a8aeead7d1b79b7faf09bd' + '77a519e250c27a9fb94eeb52da655eed7c5f2eca') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i ${srcdir}/git_fixes.diff + + # fix rendering issues with recent cairo - testing attemp taken from https://bugs.freedesktop.org/show_bug.cgi?id=47266 + # and http://lists.x.org/archives/xorg-driver-ati/2012-April/022724.html + patch -Np1 -i ${srcdir}/0000-poor-man-s-solid-picture-support-for-r300-r600.patch + patch -Np1 -i ${srcdir}/0001-poor-man-s-solid-picture-support-for-evergreen.patch + patch -Np1 -i ${srcdir}/0002-poor-man-s-solid-picture-support-for-r100.patch + patch -Np1 -i ${srcdir}/0003-poor-man-s-solid-picture-support-for-r200.patch + ./configure --prefix=/usr --enable-dri make } diff --git a/extra/xf86-video-ati/git_fixes.diff b/extra/xf86-video-ati/git_fixes.diff new file mode 100644 index 000000000..0c4518319 --- /dev/null +++ b/extra/xf86-video-ati/git_fixes.diff @@ -0,0 +1,33 @@ +From d282719a9c2fb0ee32830aa75b8dfbb9392954ed Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Wed, 04 Apr 2012 21:08:30 +0000 +Subject: r6xx-r9xx: force 1D tiling for buffer with height < 64 + +Due to some old kernel issue, height is 8 aligned insided the ddx +For buffer with height btw 57 & 63 this lead ddx to believe it can +allocate a 2D tiled surface while mesa will not align height and +will assume 1D tiled leading to disagreement and rendering issue. +This patch force buffer with height < 64 to be 1D tiled. + +Signed-off-by: Jerome Glisse +--- +diff --git a/src/radeon_exa.c b/src/radeon_exa.c +index 99a5806..270dad4 100644 +--- a/src/radeon_exa.c ++++ b/src/radeon_exa.c +@@ -511,6 +511,13 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, + surface.last_level = 0; + surface.bpe = cpp; + surface.nsamples = 1; ++ if (height < 64) { ++ /* disable 2d tiling for small surface to work around ++ * the fact that ddx align height to 8 pixel for old ++ * obscure reason i can't remember ++ */ ++ tiling &= ~RADEON_TILING_MACRO; ++ } + surface.flags = RADEON_SURF_SCANOUT; + surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); + surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE); +-- +cgit v0.9.0.2-2-gbebe diff --git a/extra/xf86-video-i740/PKGBUILD b/extra/xf86-video-i740/PKGBUILD index 04217ad7e..6e796ce50 100644 --- a/extra/xf86-video-i740/PKGBUILD +++ b/extra/xf86-video-i740/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 153340 2012-03-12 20:53:33Z andyrtr $ +# $Id: PKGBUILD 158884 2012-05-12 17:37:01Z andyrtr $ #Maintainer: Jan de Groot pkgname=xf86-video-i740 -pkgver=1.3.2 -pkgrel=8 +pkgver=1.3.3 +pkgrel=1 pkgdesc="X.org Intel i740 video driver" arch=(i686 x86_64) url="http://xorg.freedesktop.org/" @@ -14,7 +14,7 @@ conflicts=('xorg-server<1.11.99.903') groups=('xorg-drivers' 'xorg') options=('!libtool') source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) -sha1sums=('aadd2168153f780c487778e5fdda5473ed4b243d') +sha1sums=('885660aad0d558ae0fb69f3b639c03f084a7a615') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/xf86-video-s3/PKGBUILD b/extra/xf86-video-s3/PKGBUILD index 613fd4831..8c9a6b8a7 100644 --- a/extra/xf86-video-s3/PKGBUILD +++ b/extra/xf86-video-s3/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 155417 2012-04-03 11:24:01Z jgc $ +# $Id: PKGBUILD 158890 2012-05-12 18:14:42Z andyrtr $ # Maintainer: Jan de Groot pkgname=xf86-video-s3 -pkgver=0.6.3 -pkgrel=8 +pkgver=0.6.4 +pkgrel=1 pkgdesc="X.org S3 video driver" arch=(i686 x86_64) url="http://xorg.freedesktop.org/" @@ -13,15 +13,13 @@ makedepends=('xorg-server-devel>=1.12.0') conflicts=('xorg-server<1.12.0') options=('!libtool') groups=('xorg-drivers' 'xorg') -source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 - git-fixes.patch) -md5sums=('5eb06d88533fb327d067928faeb20860' - '8b3033b16ee826a9e0870dd80717eafd') +source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) +sha1sums=('9170e57f966d810fdfc2de4473a7c8e814019c31') build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i "${srcdir}/git-fixes.patch" - autoreconf -fi + #patch -Np1 -i "${srcdir}/git-fixes.patch" + #autoreconf -fi ./configure --prefix=/usr make } diff --git a/extra/xfce4-genmon-plugin/PKGBUILD b/extra/xfce4-genmon-plugin/PKGBUILD index a019adb4a..6d2391f4c 100644 --- a/extra/xfce4-genmon-plugin/PKGBUILD +++ b/extra/xfce4-genmon-plugin/PKGBUILD @@ -1,33 +1,38 @@ -# $Id: PKGBUILD 157859 2012-04-30 04:20:27Z foutrelis $ -# Maintainer: AndyRTR +# $Id: PKGBUILD 158882 2012-05-12 17:34:09Z foutrelis $ +# Maintainer: +# Contributor: AndyRTR # Contributor: Tobias Kieslich pkgname=xfce4-genmon-plugin -pkgver=3.3.1 -pkgrel=2 +pkgver=3.4.0 +pkgrel=1 pkgdesc="plugin that monitors customizable programs stdout for the Xfce4 panel" -arch=(i686 x86_64) +arch=('i686' 'x86_64') license=('LGPL2.1') url="http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin" groups=('xfce4-goodies') -depends=('xfce4-panel' 'libxfcegui4') +depends=('xfce4-panel') makedepends=('intltool') options=('!libtool') -source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/3.3/${pkgname}-${pkgver}.tar.bz2) -md5sums=('e0022e15d4211a87c17d9f252b68e1d3') +source=(http://archive.xfce.org/src/panel-plugins/$pkgname/3.4/$pkgname-$pkgver.tar.bz2) +sha256sums=('b0a5337b49c85623dc89f3c9e47c7374b1d466af2418033d2d6dfc57a9790387') build() { - cd ${srcdir}/${pkgname}-${pkgver} - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --disable-static \ - --disable-debug + cd "$srcdir/$pkgname-3.4" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --disable-static \ + --disable-debug make } package() { - cd ${srcdir}/${pkgname}-${pkgver} - make DESTDIR=${pkgdir} install + cd "$srcdir/$pkgname-3.4" + make DESTDIR="$pkgdir" install } + +# vim:set ts=2 sw=2 et: diff --git a/extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff b/extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff new file mode 100644 index 000000000..12c110151 --- /dev/null +++ b/extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff @@ -0,0 +1,116 @@ +--- xorg-server-1.12.1/exa/exa_glyphs.c 2012-03-30 04:57:25.000000000 +0200 ++++ xorg-server-1.12.1/exa_glyphs.c.new 2012-04-15 11:48:51.683214230 +0200 +@@ -686,6 +686,7 @@ + PixmapPtr pMaskPixmap = 0; + PicturePtr pMask = NULL; + ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ ExaScreenPriv(pScreen); + int width = 0, height = 0; + int x, y; + int first_xOff = list->xOff, first_yOff = list->yOff; +@@ -697,7 +698,6 @@ + ExaGlyphBuffer buffer; + + if (maskFormat) { +- ExaScreenPriv(pScreen); + GCPtr pGC; + xRectangle rect; + +@@ -719,22 +719,20 @@ + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) +- return; ++ goto fallback; + component_alpha = NeedsComponent(maskFormat->format); + pMask = CreatePicture(0, &pMaskPixmap->drawable, + maskFormat, CPComponentAlpha, &component_alpha, + serverClient, &error); +- if (!pMask || +- (!component_alpha && pExaScr->info->CheckComposite && +- !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))) ++ (*pScreen->DestroyPixmap) (pMaskPixmap); ++ if (!pMask) ++ goto fallback; ++ ++ if (!component_alpha && pExaScr->info->CheckComposite && ++ !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask)) + { + PictFormatPtr argbFormat; + +- (*pScreen->DestroyPixmap) (pMaskPixmap); +- +- if (!pMask) +- return; +- + /* The driver can't seem to composite to a8, let's try argb (but + * without component-alpha) */ + FreePicture((pointer) pMask, (XID) 0); +@@ -748,15 +746,25 @@ + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) +- return; ++ goto fallback; + + pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, 0, 0, + serverClient, &error); +- if (!pMask) { +- (*pScreen->DestroyPixmap) (pMaskPixmap); +- return; +- } ++ (*pScreen->DestroyPixmap) (pMaskPixmap); ++ if (!pMask) ++ goto fallback; + } ++ ++ if (pExaScr->info->CheckComposite && ++ (!(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask) || ++ (!(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst) && ++ (op != PictOpOver || ++ !(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, pDst) || ++ !(*pExaScr->info->CheckComposite) (PictOpOver, pSrc, pMask, pDst))))) { ++ FreePicture ((pointer) pMask, (XID) 0); ++ goto fallback; ++ } ++ + pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen); + ValidateGC(&pMaskPixmap->drawable, pGC); + rect.x = 0; +@@ -769,6 +777,13 @@ + y = -extents.y1; + } + else { ++ if (pExaScr->info->CheckComposite && ++ !(*pExaScr->info->CheckComposite) (op, pSrc, NULL, pDst) && ++ (op != PictOpOver || ++ !(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, NULL, pDst) || ++ !(*pExaScr->info->CheckComposite) (PictOpOver, pSrc, NULL, pDst))) ++ goto fallback; ++ + x = 0; + y = 0; + } +@@ -834,6 +849,10 @@ + xSrc + x - first_xOff, + ySrc + y - first_yOff, 0, 0, x, y, width, height); + FreePicture((pointer) pMask, (XID) 0); +- (*pScreen->DestroyPixmap) (pMaskPixmap); + } ++ ++ return; ++ ++fallback: ++ ExaCheckGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + } +--- xorg-server-1.12.1/exa/exa_render.c 2012-03-30 04:57:25.000000000 +0200 ++++ xorg-server-1.12.1/exa_render.c.new 2012-04-15 11:50:35.272482047 +0200 +@@ -878,7 +878,7 @@ + Bool saveMaskRepeat = pMask ? pMask->repeat : 0; + RegionRec region; + +- if (pExaScr->swappedOut) ++ if (pExaScr->fallback_counter || pExaScr->swappedOut) + goto fallback; + + /* Remove repeat in source if useless */ diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index dd14c2e75..0ab1942fa 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 156103 2012-04-14 07:35:46Z andyrtr $ +# $Id: PKGBUILD 158860 2012-05-12 13:09:37Z andyrtr $ # Maintainer: Jan de Groot pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel') pkgver=1.12.1 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') license=('custom') url="http://xorg.freedesktop.org" @@ -16,6 +16,7 @@ options=('!libtool') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 autoconfig-nvidia.patch autoconfig-sis.patch + EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff #git-fixes.patch xvfb-run xvfb-run.1 @@ -23,6 +24,7 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 sha1sums=('922b963901f4711449b53fb32ce3e14f5b642766' '63836e5cfb4ae7353fb2e31239a544409c7ead32' '175de5630b43dbc97778adfba5563b7fdd77f11f' + '4acb39587f73bcbb9a331377d6ef99cb73eb95a8' 'c94f742d3f9cabf958ae58e4015d9dd185aabedc' '6838fc00ef4618c924a77e0fb03c05346080908a' '993798f3d22ad672d769dae5f48d1fa068d5578f') @@ -36,6 +38,11 @@ build() { # Use unofficial imedia SiS driver for supported SiS devices patch -Np0 -i "${srcdir}/autoconfig-sis.patch" + # fix glitches and crashes with EXA and cairo 1.12 + # taken from https://bugs.freedesktop.org/show_bug.cgi?id=47266 + # and reworked for 1.12.1 changes + patch -Np1 -i ${srcdir}/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff + # Add post-release patches from 1.11 branch # patch -Np1 -i "${srcdir}/git-fixes.patch" -- cgit v1.2.3-54-g00ecf