From 48514fee3c8ec26f36e142ffc9272e510b9a4238 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 30 Jul 2004 20:30:57 +0000 Subject: Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all framebuffer formats except cfb and the overlay modes should work, and r128 and radeon need to be loaded from the ati driver (both issues to be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga drivers. elfloader users shouldn't be affected. --- fb/fb.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'fb/fb.h') diff --git a/fb/fb.h b/fb/fb.h index 0b5c98aff..d9bd145c2 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -22,7 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $XdotOrg$ */ +/* $XdotOrg: xc/programs/Xserver/fb/fb.h,v 1.4 2004/06/21 13:51:57 ago Exp $ */ #ifndef _FB_H_ #define _FB_H_ @@ -564,9 +564,13 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); } \ } +/* XXX fb*PrivateIndex should be static, but it breaks the ABI */ + extern int fbGCPrivateIndex; +extern int fbGetGCPrivateIndex(void); #ifndef FB_NO_WINDOW_PIXMAPS extern int fbWinPrivateIndex; +extern int fbGetWinPrivateIndex(void); #endif extern const GCOps fbGCOps; extern const GCFuncs fbGCFuncs; @@ -587,6 +591,7 @@ extern WindowPtr *WindowTable; #ifdef FB_SCREEN_PRIVATE extern int fbScreenPrivateIndex; +extern int fbGetScreenPrivateIndex(void); /* private field of a screen */ typedef struct { @@ -595,7 +600,7 @@ typedef struct { } FbScreenPrivRec, *FbScreenPrivPtr; #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ - (pScreen)->devPrivates[fbScreenPrivateIndex].ptr) + (pScreen)->devPrivates[fbGetScreenPrivateIndex()].ptr) #endif /* private field of GC */ @@ -619,7 +624,7 @@ typedef struct { } FbGCPrivRec, *FbGCPrivPtr; #define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ - (pGC)->devPrivates[fbGCPrivateIndex].ptr) + (pGC)->devPrivates[fbGetGCPrivateIndex()].ptr) #ifdef FB_OLD_GC #define fbGetCompositeClip(pGC) (fbGetGCPrivate(pGC)->pCompositeClip) @@ -638,7 +643,7 @@ typedef struct { #define fbGetWindowPixmap(d) fbGetScreenPixmap(((DrawablePtr) (d))->pScreen) #else #define fbGetWindowPixmap(pWin) ((PixmapPtr)\ - ((WindowPtr) (pWin))->devPrivates[fbWinPrivateIndex].ptr) + ((WindowPtr) (pWin))->devPrivates[fbGetWinPrivateIndex()].ptr) #endif #if defined(__DARWIN__)||defined(__CYGWIN__) -- cgit v1.2.3