diff -ur xc_ori/programs/Xserver/fb/fbcompose.c xc/programs/Xserver/fb/fbcompose.c --- xc_ori/programs/Xserver/fb/fbcompose.c 2005-08-11 17:59:17.000000000 +0000 +++ xc/programs/Xserver/fb/fbcompose.c 2005-08-31 10:52:23.000000000 +0000 @@ -1632,6 +1632,54 @@ } CARD32 +fbFetch_a2r10g10b10 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD32 *)line)[offset >> 5]; + + return ((pixel & 0xc0000000) | + ((pixel >> 6) & 0xff0000) | + ((pixel >> 4) & 0xff00) | + ((pixel >> 2) & 0xff) ); +} + +CARD32 +fbFetch_x2r10g10b10 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD32 *)line)[offset >> 5]; + + return ( 0xff000000 | + ((pixel >> 6) & 0xff0000) | + ((pixel >> 4) & 0xff00) | + ((pixel >> 2) & 0xff) ); +} + +CARD32 +fbFetch_a2b10g10r10 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD32 *)line)[offset >> 5]; + + return ((pixel & 0xc0000000) | + ((pixel >> 22) & 0xff) | + ((pixel >> 4) & 0xff00) | + ((pixel & 0x3fc) << 14) ); +} + +CARD32 +fbFetch_x2b10g10r10 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD32 *)line)[offset >> 5]; + + return ( 0xff000000 | + ((pixel >> 22) & 0xff) | + ((pixel >> 4) & 0xff00) | + ((pixel & 0x3fc) << 14) ); +} + +CARD32 fbFetch_r8g8b8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2075,6 +2123,38 @@ } void +fbStore_a2r10g10b10 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + Splita(value); + ((CARD32 *)line)[offset >> 5] = (a & 0xc0) << 24 | r << 22 | g << 12 | b << 2; +} + +void +fbStore_x2r10g10b10 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + Split(value); + ((CARD32 *)line)[offset >> 5] = r << 22 | g << 12 | b << 2; +} + +void +fbStore_a2b10g10r10 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + Splita(value); + ((CARD32 *)line)[offset >> 5] = (a & 0xc0) << 24 | b << 22 | g << 12 | r << 2; +} + +void +fbStore_x2b10g10r10 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + Split(value); + ((CARD32 *)line)[offset >> 5] = b << 22 | g << 12 | r << 2; +} + +void fbStore_r8g8b8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2590,6 +2670,12 @@ { PICT_a8b8g8r8, fbFetch_a8b8g8r8, fbFetch_a8b8g8r8, fbStore_a8b8g8r8 }, { PICT_x8b8g8r8, fbFetch_x8b8g8r8, fbFetch_x8b8g8r8, fbStore_x8b8g8r8 }, + /* 30bpp formats */ + { PICT_a2r10g10b10, fbFetch_a2r10g10b10, fbFetch_a2r10g10b10, fbStore_a2r10g10b10 }, + { PICT_x2r10g10b10, fbFetch_x2r10g10b10, fbFetch_x2r10g10b10, fbStore_x2r10g10b10 }, + { PICT_a2b10g10r10, fbFetch_a2b10g10r10, fbFetch_a2b10g10r10, fbStore_a2b10g10r10 }, + { PICT_x2b10g10r10, fbFetch_x2b10g10r10, fbFetch_x2b10g10r10, fbStore_x2b10g10r10 }, + /* 24bpp formats */ { PICT_r8g8b8, fbFetch_r8g8b8, fbFetch_r8g8b8, fbStore_r8g8b8 }, { PICT_b8g8r8, fbFetch_b8g8r8, fbFetch_b8g8r8, fbStore_b8g8r8 }, diff -ur xc_ori/programs/Xserver/fb/fbpict.h xc/programs/Xserver/fb/fbpict.h --- xc_ori/programs/Xserver/fb/fbpict.h 2005-08-11 17:59:09.000000000 +0000 +++ xc/programs/Xserver/fb/fbpict.h 2005-08-30 16:01:57.000000000 +0000 @@ -604,6 +604,18 @@ fbFetch_x8b8g8r8 (FbCompositeOperand *op); CARD32 +fbFetch_a2r10g10b10 (FbCompositeOperand *op); + +CARD32 +fbFetch_x2r10g10b10 (FbCompositeOperand *op); + +CARD32 +fbFetch_a2b10g10r10 (FbCompositeOperand *op); + +CARD32 +fbFetch_x2b10g10r10 (FbCompositeOperand *op); + +CARD32 fbFetch_r8g8b8 (FbCompositeOperand *op); CARD32 @@ -703,6 +715,18 @@ fbStore_x8b8g8r8 (FbCompositeOperand *op, CARD32 value); void +fbStore_a2r10g10b10 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_x2r10g10b10 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_a2b10g10r10 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_x2b10g10r10 (FbCompositeOperand *op, CARD32 value); + +void fbStore_r8g8b8 (FbCompositeOperand *op, CARD32 value); void diff -ur xc_ori/programs/Xserver/render/picture.h xc/programs/Xserver/render/picture.h --- xc_ori/programs/Xserver/render/picture.h 2004-08-06 23:42:10.000000000 +0000 +++ xc/programs/Xserver/render/picture.h 2005-08-30 15:02:05.000000000 +0000 @@ -73,6 +73,12 @@ #define PICT_a8b8g8r8 PICT_FORMAT(32,PICT_TYPE_ABGR,8,8,8,8) #define PICT_x8b8g8r8 PICT_FORMAT(32,PICT_TYPE_ABGR,0,8,8,8) +/* 30bpp formats */ +#define PICT_a2r10g10b10 PICT_FORMAT(32,PICT_TYPE_ARGB,2,10,10,10) +#define PICT_x2r10g10b10 PICT_FORMAT(32,PICT_TYPE_ARGB,0,10,10,10) +#define PICT_a2b10g10r10 PICT_FORMAT(32,PICT_TYPE_ABGR,2,10,10,10) +#define PICT_x2b10g10r10 PICT_FORMAT(32,PICT_TYPE_ABGR,0,10,10,10) + /* 24bpp formats */ #define PICT_r8g8b8 PICT_FORMAT(24,PICT_TYPE_ARGB,0,8,8,8) #define PICT_b8g8r8 PICT_FORMAT(24,PICT_TYPE_ABGR,0,8,8,8)