rpms/xorg-x11-server/devel xorg-x11-server-1.0.99.901-render-x4a4-crash.patch, NONE, 1.1 xorg-x11-server.spec, 1.56, 1.57

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Apr 24 18:35:33 UTC 2006


Author: ajackson

Update of /cvs/dist/rpms/xorg-x11-server/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv18783

Modified Files:
	xorg-x11-server.spec 
Added Files:
	xorg-x11-server-1.0.99.901-render-x4a4-crash.patch 
Log Message:
- Backport a Render crash fix from HEAD.


xorg-x11-server-1.0.99.901-render-x4a4-crash.patch:
 fb/fbcompose.c   |   25 ++++++++++++++++++++++++-
 render/picture.c |    8 ++++++--
 render/picture.h |    9 +++++++++
 3 files changed, 39 insertions(+), 3 deletions(-)

--- NEW FILE xorg-x11-server-1.0.99.901-render-x4a4-crash.patch ---
--- ./render/picture.c.render-x4a4-crash	2006-03-08 01:19:37.000000000 -0500
+++ ./render/picture.c	2006-04-24 13:43:57.000000000 -0400
@@ -234,10 +234,14 @@
     formats[nformats].format = PICT_a1;
     formats[nformats].depth = 1;
     nformats++;
-    formats[nformats].format = PICT_a8;
+    formats[nformats].format = PICT_FORMAT(BitsPerPixel(8),
+					   PICT_TYPE_A,
+					   8, 0, 0, 0);
     formats[nformats].depth = 8;
     nformats++;
-    formats[nformats].format = PICT_a4;
+    formats[nformats].format = PICT_FORMAT(BitsPerPixel(4),
+					   PICT_TYPE_A,
+					   4, 0, 0, 0);
     formats[nformats].depth = 4;
     nformats++;
     formats[nformats].format = PICT_a8r8g8b8;
--- ./render/picture.h.render-x4a4-crash	2005-08-24 07:18:33.000000000 -0400
+++ ./render/picture.h	2006-04-24 13:43:57.000000000 -0400
@@ -100,6 +100,15 @@
 #define PICT_c8		PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
 #define PICT_g8		PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
 
+#define PICT_x4a4	PICT_FORMAT(8,PICT_TYPE_A,4,0,0,0)
+#define PICT_x4r1g2b1	PICT_FORMAT(8,PICT_TYPE_ARGB,0,1,2,1)
+#define PICT_x4b1g2r1	PICT_FORMAT(8,PICT_TYPE_ABGR,0,1,2,1)
+#define PICT_x4a1r1g1b1	PICT_FORMAT(8,PICT_TYPE_ARGB,1,1,1,1)
+#define PICT_x4a1b1g1r1	PICT_FORMAT(8,PICT_TYPE_ABGR,1,1,1,1)
+				    
+#define PICT_x4c4	PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
+#define PICT_x4g4	PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
+
 /* 4bpp formats */
 #define PICT_a4		PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0)
 #define PICT_r1g2b1	PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1)
--- ./fb/fbcompose.c.render-x4a4-crash	2006-02-10 17:00:21.000000000 -0500
+++ ./fb/fbcompose.c	2006-04-24 13:43:57.000000000 -0400
@@ -385,6 +385,17 @@
     }
 }
 
+static FASTCALL void
+fbFetch_x4a4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
+{
+    const CARD8 *pixel = (const CARD8 *)bits + x;
+    const CARD8 *end = pixel + width;
+    while (pixel < end) {
+	CARD8 p = (*pixel++) & 0xf;
+        *buffer++ = (p | (p << 4)) << 24;
+    }
+}
+
 #define Fetch8(l,o)    (((CARD8 *) (l))[(o) >> 2])
 #if IMAGE_BYTE_ORDER == MSBFirst
 #define Fetch4(l,o)    ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
@@ -548,7 +559,8 @@
     case PICT_a2b2g2r2: return fbFetch_a2b2g2r2;
     case PICT_c8: return  fbFetch_c8;
     case PICT_g8: return  fbFetch_c8;
-
+    case PICT_x4a4: return fbFetch_x4a4;
+    
         /* 4bpp formats */
     case PICT_a4: return  fbFetch_a4;
     case PICT_r1g2b1: return fbFetch_r1g2b1;
@@ -1261,6 +1273,16 @@
     }
 }
 
+static FASTCALL void
+fbStore_x4a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
+{
+    int i;
+    CARD8   *pixel = ((CARD8 *) bits) + x;
+    for (i = 0; i < width; ++i) {
+        *pixel++ = values[i] >> 28;
+    }
+}
+
 #define Store8(l,o,v)  (((CARD8 *) l)[(o) >> 3] = (v))
 #if IMAGE_BYTE_ORDER == MSBFirst
 #define Store4(l,o,v)  Store8(l,o,((o) & 4 ? \
@@ -1412,6 +1434,7 @@
     case PICT_a2r2g2b2: return fbStore_a2r2g2b2;
     case PICT_c8: return  fbStore_c8;
     case PICT_g8: return  fbStore_c8;
+    case PICT_x4a4: return fbStore_x4a4;
 
         /* 4bpp formats */
     case PICT_a4: return  fbStore_a4;


Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/dist/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- xorg-x11-server.spec	14 Apr 2006 03:21:31 -0000	1.56
+++ xorg-x11-server.spec	24 Apr 2006 18:34:51 -0000	1.57
@@ -4,7 +4,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.0.99.901
-Release:   5
+Release:   6
 URL:       http://www.x.org
 License:   MIT/X11
 Group:     User Interface/X
@@ -23,8 +23,11 @@
 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181292.  hacky patch
 Patch7:    xorg-x11-server-1.0.1-fpic-libxf86config.patch
 
-# REMOVE ME FOR 1.0.99.902
+# REMOVE ME: backports from branch tip, remove on next snapshot
+# TODO: After .902, start these at Patch50
 Patch8:	   xorg-x11-server-1.0.99.901-cow-fix.patch
+Patch9:    xorg-x11-server-1.0.99.901-render-x4a4-crash.patch
+# END REMOVE ME
 
 # Spiffiffity feature/optimization patches.
 Patch100:  xorg-server-1.0.99.2-spiffiffity.patch
@@ -259,7 +262,11 @@
 %patch4 -p0 -b .composite-fastpath-fdo4320
 %patch6 -p1 -b .randrsdk
 %patch7 -p1 -b .xf86configfpic
+
+# REMOVE ME
 %patch8 -p0 -b .cow-fix
+%patch9 -p0 -b .render-x4a4-crash
+# END REMOVE ME
 
 %patch100 -p0 -b .spiffiffity
 
@@ -566,6 +573,9 @@
 # -------------------------------------------------------------------
 
 %changelog
+* Mon Apr 24 2006 Adam Jackson <ajackson at redhat.com> 1.0.99.901-6
+- Backport a Render crash fix from HEAD.
+
 * Thu Apr 13 2006 Kristian Høgsberg <krh at redhat.com> 1.0.99.901-5
 - Update spiffiffity patch to only suppress move damage events for
   manually redirected windows.




More information about the fedora-cvs-commits mailing list