diff options
author | Adam Jackson <ajax@nwnk.net> | 2004-07-30 20:30:51 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2004-07-30 20:30:51 +0000 |
commit | 8b0f17920a54bdf3d54c0d07b4293d617d2ff964 (patch) | |
tree | 41fb5a834570fea73e719ac155f7d06443448f2d /src | |
parent | 5f64cbc462a1a841bebe1fa5bae57560a8def42f (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/apm_accel.c | 10 | ||||
-rw-r--r-- | src/apm_funcs.c | 13 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/apm_accel.c b/src/apm_accel.c index 72b0cee..bce9e2e 100644 --- a/src/apm_accel.c +++ b/src/apm_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_accel.c,v 1.21 2002/10/08 22:14:03 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_accel.c,v 1.20tsi Exp $ */ #include "apm.h" #include "miline.h" @@ -70,6 +70,10 @@ ApmCacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) struct ApmStippleCacheRec *pCache; unsigned char *srcPtr; CARD32 *dstPtr; + static StippleScanlineProcPtr *StippleTab = NULL; + + if (!StippleTab) + StippleTab = LoaderSymbol("XAAStippleScanlineFuncMSBFirst"); for (i = 0; i < APM_CACHE_NUMBER; i++) if ((pApm->apmCache[i].apmStippleCache.serialNumber == pPix->drawable.serialNumber) @@ -127,7 +131,7 @@ ApmCacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) while (j + h <= pCache->apmStippleCache.h) { srcPtr = (unsigned char *)pPix->devPrivate.ptr; for (i = h; --i >= 0; ) { - (*XAAStippleScanlineFuncMSBFirst[funcNo])(dstPtr, (CARD32 *)srcPtr, 0, w, dwords); + StippleTab[funcNo](dstPtr, (CARD32 *)srcPtr, 0, w, dwords); srcPtr += pPix->devKind; dstPtr += dwords; } @@ -135,7 +139,7 @@ ApmCacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) } srcPtr = (unsigned char *)pPix->devPrivate.ptr; for (i = pCache->apmStippleCache.h - j ; --i >= 0; ) { - (*XAAStippleScanlineFuncMSBFirst[funcNo])(dstPtr, (CARD32 *)srcPtr, 0, w, dwords); + StippleTab[funcNo](dstPtr, (CARD32 *)srcPtr, 0, w, dwords); srcPtr += pPix->devKind; dstPtr += dwords; } diff --git a/src/apm_funcs.c b/src/apm_funcs.c index 71f0fe8..c63a3a9 100644 --- a/src/apm_funcs.c +++ b/src/apm_funcs.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_funcs.c,v 1.17 2002/05/07 12:53:49 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_funcs.c,v 1.18tsi Exp $ */ #define FASTER #ifndef PSZ @@ -38,7 +38,7 @@ # define A(s) Apm##s # endif #endif -#define DPRINTNAME(s) do { xf86DrvMsgVerb(pScrn->pScreen->myNum, X_NOTICE, 4, "Apm" #s APM_SUFF_24 APM_SUFF_IOP "\n"); } while (0) +#define DPRINTNAME(s) do { xf86DrvMsgVerb(pScrn->pScreen->myNum, X_NOTICE, 6, "Apm" #s APM_SUFF_24 APM_SUFF_IOP "\n"); } while (0) #if PSZ == 24 #undef SETSOURCEXY @@ -713,9 +713,13 @@ A(TEGlyphRenderer)(ScrnInfoPtr pScrn, int x, int y, int w, int h, int fg, int bg, int rop, unsigned planemask) { CARD32 *base, *base0; - GlyphScanlineFuncPtr GlyphFunc = XAAGlyphScanlineFuncLSBFirst[glyphWidth - 1]; + GlyphScanlineFuncPtr GlyphFunc; + static GlyphScanlineFuncPtr *GlyphTab = NULL; int w2, h2, dwords; + if (!GlyphTab) GlyphTab = LoaderSymbol("XAAGlyphScanlineFuncLSBFirst"); + GlyphFunc = GlyphTab[glyphWidth - 1]; + w2 = w + skipleft; h2 = h; dwords = (w2 + 31) >> 5; @@ -1364,7 +1368,7 @@ A(FillImageWriteRects)(ScrnInfoPtr pScrn, int rop, unsigned int planemask, PixmapPtr pPix) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - int x, y, phaseY, phaseX, phaseXB, height, width, blit_w; + int x, y, phaseY, phaseX, height, width, blit_w; int pHeight = pPix->drawable.height; int pWidth = pPix->drawable.width; int depth = pPix->drawable.depth; @@ -1404,7 +1408,6 @@ A(FillImageWriteRects)(ScrnInfoPtr pScrn, int rop, unsigned int planemask, if(!width) break; x += blit_w; phaseX = (phaseX + blit_w) % pWidth; - phaseXB = phaseX * pPix->drawable.bitsPerPixel / 8; } pBox++; } |