debian/changelog                       |    9 
 debian/patches/121_fdo-28798-fix.patch |  307 +++++++++++++++++++++++++++++++++
 debian/patches/series                  |    1 
 3 files changed, 317 insertions(+)

New commits:
commit 32ba68482c3094ddd27fc1b7de6ccf5f5bf878c7
Author: Timo Aaltonen <[email protected]>
Date:   Wed Jun 29 14:54:31 2011 +0300

    Add 121_fdo-28798-fix.patch: Remove the use of the 3D pipeline for UXA core 
rendering.
    
    This fixes incorrect rendering in some UI elements (LP: #803012).

diff --git a/debian/changelog b/debian/changelog
index bbfe940..b5f4775 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xserver-xorg-video-intel (2:2.15.0-3ubuntu2) oneiric; urgency=low
+
+  [ Sameer Morar ]
+  * Add 121_fdo-28798-fix.patch: Remove the use of the 3D pipeline for
+    UXA core rendering. This fixes incorrect rendering in some UI
+    elements (LP: #803012).
+
+ -- Timo Aaltonen <[email protected]>  Wed, 29 Jun 2011 14:53:37 +0300
+
 xserver-xorg-video-intel (2:2.15.0-3ubuntu1) oneiric; urgency=low
 
   [ Timo Aaltonen ]
diff --git a/debian/patches/121_fdo-28798-fix.patch 
b/debian/patches/121_fdo-28798-fix.patch
new file mode 100644
index 0000000..769cca8
--- /dev/null
+++ b/debian/patches/121_fdo-28798-fix.patch
@@ -0,0 +1,307 @@
+Description: Remove the use of the 3D pipeline for core rendering
+Origin/Author: 
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=855ced5a4eb67e287001ae22cb6489639c548cfa
+Bug: http://bugs.freedesktop.org/show_bug.cgi?id=28798 
+Index: xserver-xorg-video-intel-2.14.0/uxa/uxa-accel.c
+===================================================================
+--- xserver-xorg-video-intel-2.14.0.orig/uxa/uxa-accel.c       2011-06-28 
13:01:38.351466833 +0200
++++ xserver-xorg-video-intel-2.14.0/uxa/uxa-accel.c    2011-06-28 
13:01:35.463452510 +0200
+@@ -36,24 +36,6 @@
+ #include "uxa.h"
+ #include "mipict.h"
+ 
+-static CARD32
+-format_for_depth(int depth)
+-{
+-      switch (depth) {
+-      case 1: return PICT_a1;
+-      case 4: return PICT_a4;
+-      case 8: return PICT_a8;
+-      case 15: return PICT_x1r5g5b5;
+-      case 16: return PICT_r5g6b5;
+-      default:
+-      case 24: return PICT_x8r8g8b8;
+-#if XORG_VERSION_CURRENT >= 10699900
+-      case 30: return PICT_x2r10g10b10;
+-#endif
+-      case 32: return PICT_a8r8g8b8;
+-      }
+-}
+-
+ static void
+ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n,
+              DDXPointPtr ppt, int *pwidth, int fSorted)
+@@ -61,17 +43,13 @@
+       ScreenPtr screen = pDrawable->pScreen;
+       uxa_screen_t *uxa_screen = uxa_get_screen(screen);
+       RegionPtr pClip = fbGetCompositeClip(pGC);
+-      PixmapPtr dst_pixmap, src_pixmap = NULL;
++      PixmapPtr dst_pixmap;
+       BoxPtr pextent, pbox;
+       int nbox;
+       int extentX1, extentX2, extentY1, extentY2;
+       int fullX1, fullX2, fullY1;
+       int partX1, partX2;
+       int off_x, off_y;
+-      xRenderColor color;
+-      PictFormatPtr format;
+-      PicturePtr dst, src;
+-      int error;
+ 
+       if (uxa_screen->swappedOut || uxa_screen->force_fallback)
+               goto fallback;
+@@ -83,129 +61,6 @@
+       if (!dst_pixmap)
+               goto fallback;
+ 
+-      if (pGC->alu != GXcopy || !UXA_PM_IS_SOLID(pDrawable, pGC->planemask))
+-              goto solid;
+-
+-      format = PictureMatchFormat(screen,
+-                                  dst_pixmap->drawable.depth,
+-                                  
format_for_depth(dst_pixmap->drawable.depth));
+-      dst = CreatePicture(0, &dst_pixmap->drawable, format, 0, 0, 
serverClient, &error);
+-      if (!dst)
+-              goto solid;
+-
+-      ValidatePicture(dst);
+-
+-      uxa_get_rgba_from_pixel(pGC->fgPixel,
+-                              &color.red,
+-                              &color.green,
+-                              &color.blue,
+-                              &color.alpha,
+-                              format_for_depth(dst_pixmap->drawable.depth));
+-      src = CreateSolidPicture(0, &color, &error);
+-      if (!src) {
+-              FreePicture(dst, 0);
+-              goto solid;
+-      }
+-
+-      if (!uxa_screen->info->check_composite(PictOpSrc, src, NULL, dst, 0, 
0)) {
+-              FreePicture(src, 0);
+-              FreePicture(dst, 0);
+-              goto solid;
+-      }
+-
+-      if (!uxa_screen->info->check_composite_texture ||
+-          !uxa_screen->info->check_composite_texture(screen, src)) {
+-              PicturePtr solid;
+-              int src_off_x, src_off_y;
+-
+-              solid = uxa_acquire_solid(screen, src->pSourcePict);
+-              FreePicture(src, 0);
+-              if (!solid) {
+-                      FreePicture(dst, 0);
+-                      goto solid;
+-              }
+-
+-              src = solid;
+-              src_pixmap = uxa_get_offscreen_pixmap(src->pDrawable,
+-                                                    &src_off_x, &src_off_y);
+-              if (!src_pixmap) {
+-                      FreePicture(src, 0);
+-                      FreePicture(dst, 0);
+-                      goto solid;
+-              }
+-      }
+-
+-      if (!uxa_screen->info->prepare_composite(PictOpSrc, src, NULL, dst, 
src_pixmap, NULL, dst_pixmap)) {
+-              FreePicture(src, 0);
+-              FreePicture(dst, 0);
+-              goto solid;
+-      }
+-
+-      pextent = REGION_EXTENTS(pGC->screen, pClip);
+-      extentX1 = pextent->x1;
+-      extentY1 = pextent->y1;
+-      extentX2 = pextent->x2;
+-      extentY2 = pextent->y2;
+-      while (n--) {
+-              fullX1 = ppt->x;
+-              fullY1 = ppt->y;
+-              fullX2 = fullX1 + (int)*pwidth;
+-              ppt++;
+-              pwidth++;
+-
+-              if (fullY1 < extentY1 || extentY2 <= fullY1)
+-                      continue;
+-
+-              if (fullX1 < extentX1)
+-                      fullX1 = extentX1;
+-
+-              if (fullX2 > extentX2)
+-                      fullX2 = extentX2;
+-
+-              if (fullX1 >= fullX2)
+-                      continue;
+-
+-              nbox = REGION_NUM_RECTS(pClip);
+-              if (nbox == 1) {
+-                      uxa_screen->info->composite(dst_pixmap,
+-                                                  0, 0, 0, 0,
+-                                                  fullX1 + off_x,
+-                                                  fullY1 + off_y,
+-                                                  fullX2 - fullX1, 1);
+-              } else {
+-                      pbox = REGION_RECTS(pClip);
+-                      while (nbox--) {
+-                              if (pbox->y1 > fullY1)
+-                                      break;
+-
+-                              if (pbox->y1 <= fullY1) {
+-                                      partX1 = pbox->x1;
+-                                      if (partX1 < fullX1)
+-                                              partX1 = fullX1;
+-
+-                                      partX2 = pbox->x2;
+-                                      if (partX2 > fullX2)
+-                                              partX2 = fullX2;
+-
+-                                      if (partX2 > partX1) {
+-                                              
uxa_screen->info->composite(dst_pixmap,
+-                                                                          0, 
0, 0, 0,
+-                                                                          
partX1 + off_x,
+-                                                                          
fullY1 + off_y,
+-                                                                          
partX2 - partX1, 1);
+-                                      }
+-                              }
+-                              pbox++;
+-                      }
+-              }
+-      }
+-
+-      uxa_screen->info->done_composite(dst_pixmap);
+-      FreePicture(src, 0);
+-      FreePicture(dst, 0);
+-      return;
+-
+-solid:
+       if (uxa_screen->info->check_solid &&
+           !uxa_screen->info->check_solid(pDrawable, pGC->alu, pGC->planemask))
+               goto fallback;
+@@ -1040,7 +895,7 @@
+       PixmapPtr pixmap;
+       int xoff, yoff;
+       int nbox;
+-      BoxPtr pBox, extents;
++      BoxPtr pBox;
+       Bool ret = FALSE;
+ 
+       pixmap = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff);
+@@ -1051,105 +906,22 @@
+ 
+       nbox = REGION_NUM_RECTS(pRegion);
+       pBox = REGION_RECTS(pRegion);
+-      extents = REGION_EXTENTS(screen, pRegion);
+-
+-      /* Using GEM, the relocation costs outweigh the advantages of the 
blitter */
+-      if (nbox == 1 || (alu != GXcopy && alu != GXclear) || 
!UXA_PM_IS_SOLID(&pixmap->drawable, planemask)) {
+-try_solid:
+-              if (uxa_screen->info->check_solid &&
+-                  !uxa_screen->info->check_solid(&pixmap->drawable, alu, 
planemask))
+-                      goto err;
+-
+-              if (!uxa_screen->info->prepare_solid(pixmap, alu, planemask, 
pixel))
+-                      goto err;
+-
+-              while (nbox--) {
+-                      uxa_screen->info->solid(pixmap,
+-                                              pBox->x1, pBox->y1,
+-                                              pBox->x2, pBox->y2);
+-                      pBox++;
+-              }
+-
+-              uxa_screen->info->done_solid(pixmap);
+-      } else {
+-              PicturePtr dst, src;
+-              PixmapPtr src_pixmap = NULL;
+-              xRenderColor color;
+-              int error;
+-
+-              dst = CreatePicture(0, &pixmap->drawable,
+-                                  PictureMatchFormat(screen,
+-                                                     pixmap->drawable.depth,
+-                                                     
format_for_depth(pixmap->drawable.depth)),
+-                                  0, 0, serverClient, &error);
+-              if (!dst)
+-                      goto err;
+-
+-              ValidatePicture(dst);
+-
+-              uxa_get_rgba_from_pixel(pixel,
+-                                      &color.red,
+-                                      &color.green,
+-                                      &color.blue,
+-                                      &color.alpha,
+-                                      
format_for_depth(pixmap->drawable.depth));
+-              src = CreateSolidPicture(0, &color, &error);
+-              if (!src) {
+-                      FreePicture(dst, 0);
+-                      goto err;
+-              }
+ 
+-              if (!uxa_screen->info->check_composite(PictOpSrc, src, NULL, 
dst,
+-                                                     extents->x2 - 
extents->x1,
+-                                                     extents->y2 - 
extents->y1)) {
+-                      FreePicture(src, 0);
+-                      FreePicture(dst, 0);
+-                      goto try_solid;
+-              }
+-
+-              if (!uxa_screen->info->check_composite_texture ||
+-                  !uxa_screen->info->check_composite_texture(screen, src)) {
+-                      PicturePtr solid;
+-                      int src_off_x, src_off_y;
+-
+-                      solid = uxa_acquire_solid(screen, src->pSourcePict);
+-                      FreePicture(src, 0);
+-                      if (!solid) {
+-                              FreePicture(dst, 0);
+-                              goto err;
+-                      }
+-
+-                      src = solid;
+-                      src_pixmap = uxa_get_offscreen_pixmap(src->pDrawable,
+-                                                            &src_off_x, 
&src_off_y);
+-                      if (!src_pixmap) {
+-                              FreePicture(src, 0);
+-                              FreePicture(dst, 0);
+-                              goto err;
+-                      }
+-              }
+-
+-              if (!uxa_screen->info->prepare_composite(PictOpSrc, src, NULL, 
dst, src_pixmap, NULL, pixmap)) {
+-                      FreePicture(src, 0);
+-                      FreePicture(dst, 0);
+-                      goto err;
+-              }
++    if (uxa_screen->info->check_solid &&
++        !uxa_screen->info->check_solid(&pixmap->drawable, alu, planemask))
++        goto err;
+ 
+-              while (nbox--) {
+-                      uxa_screen->info->composite(pixmap,
+-                                                  0, 0, 0, 0,
+-                                                  pBox->x1,
+-                                                  pBox->y1,
+-                                                  pBox->x2 - pBox->x1,
+-                                                  pBox->y2 - pBox->y1);
+-                      pBox++;
+-              }
++    if (!uxa_screen->info->prepare_solid(pixmap, alu, planemask, pixel))
++        goto err;
+ 
+-              uxa_screen->info->done_composite(pixmap);
+-              FreePicture(src, 0);
+-              FreePicture(dst, 0);
++    while (nbox--) {
++        uxa_screen->info->solid(pixmap,
++                                pBox->x1, pBox->y1,
++                                pBox->x2, pBox->y2);
++        pBox++;
+       }
+ 
++    uxa_screen->info->done_solid(pixmap);
+       ret = TRUE;
+ 
+ err:
diff --git a/debian/patches/series b/debian/patches/series
index d890ef3..acb63c7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 # Ubuntu patches
 101_copy-fb.patch
 120_check_privates.patch
+121_fdo-28798-fix.patch


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to