aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/xaa
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
committermarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
commitd6d3999ccb2cb72d55820770260172eccbbb68d7 (patch)
tree568ce82dd1a8e2edbbe8cd4cb5ab5b14157f34f6 /xorg-server/hw/xfree86/xaa
parentfffd436e9c2ec6f5aa501ee57d0e4ade7293ee60 (diff)
downloadvcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.gz
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.bz2
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.zip
libX11 xserver pixman mesa git update 16 Apr 2012
Diffstat (limited to 'xorg-server/hw/xfree86/xaa')
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaBitOrder.c8
-rw-r--r--xorg-server/hw/xfree86/xaa/xaacexp.h95
-rw-r--r--xorg-server/hw/xfree86/xaa/xaawrap.h154
3 files changed, 126 insertions, 131 deletions
diff --git a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
index 9b124670d..3d9b980e1 100644
--- a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
+++ b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
@@ -9,8 +9,8 @@
CARD32
XAAReverseBitOrder(CARD32 v)
{
- return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) |
- ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) |
- ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) |
- ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7));
+ return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) |
+ ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) |
+ ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) |
+ ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7));
}
diff --git a/xorg-server/hw/xfree86/xaa/xaacexp.h b/xorg-server/hw/xfree86/xaa/xaacexp.h
index 56bcda69a..6fde54c65 100644
--- a/xorg-server/hw/xfree86/xaa/xaacexp.h
+++ b/xorg-server/hw/xfree86/xaa/xaacexp.h
@@ -1,5 +1,4 @@
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -13,76 +12,76 @@
#endif
#if X_BYTE_ORDER == X_BIG_ENDIAN
-# define SHIFT_L(value, shift) ((value) >> (shift))
-# define SHIFT_R(value, shift) ((value) << (shift))
+#define SHIFT_L(value, shift) ((value) >> (shift))
+#define SHIFT_R(value, shift) ((value) << (shift))
#else
-# define SHIFT_L(value, shift) ((value) << (shift))
-# define SHIFT_R(value, shift) ((value) >> (shift))
+#define SHIFT_L(value, shift) ((value) << (shift))
+#define SHIFT_R(value, shift) ((value) >> (shift))
#endif
#ifndef MSBFIRST
-# ifdef FIXEDBASE
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data;
-# else
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data;
-# endif
-#else
-# ifdef FIXEDBASE
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data);
-# else
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data)
-# endif
+#ifdef FIXEDBASE
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data;
+#else
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data;
+#endif
+#else
+#ifdef FIXEDBASE
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data);
+#else
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data)
+#endif
#endif
#ifdef FIXEDBASE
-# ifdef MSBFIRST
-# define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b)
-# define WRITE_BITS1(b) { \
+#ifdef MSBFIRST
+#define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b)
+#define WRITE_BITS1(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
*base = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; }
-# else
-# define WRITE_BITS(b) *base = (b)
-# define WRITE_BITS1(b) { \
+#else
+#define WRITE_BITS(b) *base = (b)
+#define WRITE_BITS1(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
*base = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_expand3[((b) & 0xFF000000) >> 24] << 8; }
-# endif
+#endif
#else
-# ifdef MSBFIRST
-# define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b)
-# define WRITE_BITS1(b) { \
+#ifdef MSBFIRST
+#define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b)
+#define WRITE_BITS1(b) { \
*(base++) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*(base) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
base += 2; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*(base) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
@@ -90,18 +89,18 @@
*(base + 2) = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; \
base += 3; }
-# else
-# define WRITE_BITS(b) *(base++) = (b)
-# define WRITE_BITS1(b) { \
+#else
+#define WRITE_BITS(b) *(base++) = (b)
+#define WRITE_BITS1(b) { \
*(base++) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*(base) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
base += 2; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*(base) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
@@ -109,19 +108,19 @@
*(base + 2) = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_expand3[((b) & 0xFF000000) >> 24] << 8; \
base += 3; }
-# endif
+#endif
#endif
#ifdef FIXEDBASE
-# ifdef MSBFIRST
-# define EXPNAME(x) x##MSBFirstFixedBase
-# else
-# define EXPNAME(x) x##LSBFirstFixedBase
-# endif
+#ifdef MSBFIRST
+#define EXPNAME(x) x##MSBFirstFixedBase
#else
-# ifdef MSBFIRST
-# define EXPNAME(x) x##MSBFirst
-# else
-# define EXPNAME(x) x##LSBFirst
-# endif
+#define EXPNAME(x) x##LSBFirstFixedBase
+#endif
+#else
+#ifdef MSBFIRST
+#define EXPNAME(x) x##MSBFirst
+#else
+#define EXPNAME(x) x##LSBFirst
+#endif
#endif
diff --git a/xorg-server/hw/xfree86/xaa/xaawrap.h b/xorg-server/hw/xfree86/xaa/xaawrap.h
index 1b7595e95..2d2d7881a 100644
--- a/xorg-server/hw/xfree86/xaa/xaawrap.h
+++ b/xorg-server/hw/xfree86/xaa/xaawrap.h
@@ -1,79 +1,75 @@
-
-#define XAA_SCREEN_PROLOGUE(pScreen, field)\
- ((pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
- ((pScreen)->field = wrapper)
-
-
-#define XAA_GC_FUNC_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- (pGC)->funcs = pGCPriv->wrapFuncs;\
- if(pGCPriv->flags)\
- (pGC)->ops = pGCPriv->wrapOps
-
-#define XAA_GC_FUNC_EPILOGUE(pGC)\
- pGCPriv->wrapFuncs = (pGC)->funcs;\
- (pGC)->funcs = &XAAGCFuncs;\
- if(pGCPriv->flags) {\
- pGCPriv->wrapOps = (pGC)->ops;\
- (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
- &XAAPixmapOps;\
- }
-
-
-#define XAA_GC_OP_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- if(!RegionNumRects(pGC->pCompositeClip)) return; \
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-
-#define XAA_GC_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = pGCPriv->XAAOps
-
-
-#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps; \
- SYNC_CHECK(pGC)
-
-#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = &XAAPixmapOps;\
- pixPriv->flags |= DIRTY
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#define XAA_RENDER_PROLOGUE(pScreen,field)\
- (GetPictureScreen(pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
- (GetPictureScreen(pScreen)->field = wrapper)
-
-/* This also works fine for drawables */
-
-#define SYNC_CHECK(pGC) {\
- XAAInfoRecPtr infoRec =\
-((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
- if(infoRec->NeedToSync) {\
- (*infoRec->Sync)(infoRec->pScrn);\
- infoRec->NeedToSync = FALSE;\
- }}
+
+#define XAA_SCREEN_PROLOGUE(pScreen, field)\
+ ((pScreen)->field = \
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
+
+#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
+ ((pScreen)->field = wrapper)
+
+#define XAA_GC_FUNC_PROLOGUE(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ (pGC)->funcs = pGCPriv->wrapFuncs;\
+ if(pGCPriv->flags)\
+ (pGC)->ops = pGCPriv->wrapOps
+
+#define XAA_GC_FUNC_EPILOGUE(pGC)\
+ pGCPriv->wrapFuncs = (pGC)->funcs;\
+ (pGC)->funcs = &XAAGCFuncs;\
+ if(pGCPriv->flags) {\
+ pGCPriv->wrapOps = (pGC)->ops;\
+ (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
+ &XAAPixmapOps;\
+ }
+
+#define XAA_GC_OP_PROLOGUE(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ GCFuncs *oldFuncs = pGC->funcs;\
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps
+
+#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ GCFuncs *oldFuncs = pGC->funcs;\
+ if(!RegionNumRects(pGC->pCompositeClip)) return; \
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps
+
+#define XAA_GC_OP_EPILOGUE(pGC)\
+ pGCPriv->wrapOps = pGC->ops;\
+ pGC->funcs = oldFuncs;\
+ pGC->ops = pGCPriv->XAAOps
+
+#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
+ GCFuncs *oldFuncs = pGC->funcs;\
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps; \
+ SYNC_CHECK(pGC)
+
+#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
+ pGCPriv->wrapOps = pGC->ops;\
+ pGC->funcs = oldFuncs;\
+ pGC->ops = &XAAPixmapOps;\
+ pixPriv->flags |= DIRTY
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#define XAA_RENDER_PROLOGUE(pScreen,field)\
+ (GetPictureScreen(pScreen)->field = \
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
+
+#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
+ (GetPictureScreen(pScreen)->field = wrapper)
+
+/* This also works fine for drawables */
+
+#define SYNC_CHECK(pGC) {\
+ XAAInfoRecPtr infoRec =\
+((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
+ if(infoRec->NeedToSync) {\
+ (*infoRec->Sync)(infoRec->pScrn);\
+ infoRec->NeedToSync = FALSE;\
+ }}