mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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.
This commit is contained in:
13
fb/fb.h
13
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__)
|
||||
|
||||
@@ -27,10 +27,22 @@
|
||||
|
||||
#ifdef FB_SCREEN_PRIVATE
|
||||
int fbScreenPrivateIndex;
|
||||
int fbGetScreenPrivateIndex(void)
|
||||
{
|
||||
return fbScreenPrivateIndex;
|
||||
}
|
||||
#endif
|
||||
int fbGCPrivateIndex;
|
||||
int fbGetGCPrivateIndex(void)
|
||||
{
|
||||
return fbGCPrivateIndex;
|
||||
}
|
||||
#ifndef FB_NO_WINDOW_PIXMAPS
|
||||
int fbWinPrivateIndex;
|
||||
int fbGetWinPrivateIndex(void)
|
||||
{
|
||||
return fbWinPrivateIndex;
|
||||
}
|
||||
#endif
|
||||
int fbGeneration;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* Author: Keith Packard, SuSE, Inc.
|
||||
*/
|
||||
|
||||
/* $XdotOrg: $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/fb/fboverlay.c,v 1.3 2004/05/16 05:08:39 alanc Exp $ */
|
||||
|
||||
#include "fb.h"
|
||||
#include "fboverlay.h"
|
||||
@@ -31,6 +31,11 @@
|
||||
int fbOverlayGeneration;
|
||||
int fbOverlayScreenPrivateIndex = -1;
|
||||
|
||||
int fbOverlayGetScreenPrivateIndex(void)
|
||||
{
|
||||
return fbOverlayScreenPrivateIndex;
|
||||
}
|
||||
|
||||
/*
|
||||
* Replace this if you want something supporting
|
||||
* multiple overlays with the same depth
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
#define _FBOVERLAY_H_
|
||||
|
||||
extern int fbOverlayGeneration;
|
||||
extern int fbOverlayScreenPrivateIndex;
|
||||
extern int fbOverlayScreenPrivateIndex; /* XXX should be static */
|
||||
extern int fbOverlayGetScreenPrivateIndex(void);
|
||||
|
||||
#ifndef FB_OVERLAY_MAX
|
||||
#define FB_OVERLAY_MAX 2
|
||||
@@ -58,8 +59,8 @@ typedef struct _fbOverlayScrPriv {
|
||||
} FbOverlayScrPrivRec, *FbOverlayScrPrivPtr;
|
||||
|
||||
#define fbOverlayGetScrPriv(s) \
|
||||
((fbOverlayScreenPrivateIndex != -1) ? \
|
||||
(s)->devPrivates[fbOverlayScreenPrivateIndex].ptr : NULL)
|
||||
((fbOverlayGetScreenPrivateIndex() != -1) ? \
|
||||
(s)->devPrivates[fbOverlayGetScreenPrivateIndex()].ptr : NULL)
|
||||
Bool
|
||||
fbOverlayCreateWindow(WindowPtr pWin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user