diff options
author | Francisco Jerez <currojerez@riseup.net> | 2009-06-23 13:11:02 +0200 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2009-06-23 13:11:02 +0200 |
commit | cd9e9f25294abb739c1772e3a9a7a9c0a921ee82 (patch) | |
tree | c5d5ab9e3213a5dcec0cd705c6adfb96751e6711 /src | |
parent | 97498c048c897e5753e61d3b4ab231025974d67c (diff) |
Fix EXA rotation for SM502 at 32bpp (bug 22432).
Diffstat (limited to 'src')
-rw-r--r-- | src/smi_exa.c | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/src/smi_exa.c b/src/smi_exa.c index 1b6d42f..5103924 100644 --- a/src/smi_exa.c +++ b/src/smi_exa.c @@ -78,9 +78,6 @@ static void SMI_Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int width, int height); static void -SMI501_Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, - int dstX, int dstY, int width, int height); -static void SMI730_Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int width, int height); static void @@ -169,12 +166,11 @@ SMI_EXAInit(ScreenPtr pScreen) pSmi->EXADriverPtr->CheckComposite = SMI_CheckComposite; pSmi->EXADriverPtr->PrepareComposite = SMI_PrepareComposite; - if (IS_MSOC(pSmi)) - pSmi->EXADriverPtr->Composite = SMI501_Composite; - else if (pSmi->Chipset == SMI_COUGAR3DR) + if (IS_MSOC(pSmi) || pSmi->Chipset == SMI_COUGAR3DR) pSmi->EXADriverPtr->Composite = SMI730_Composite; else pSmi->EXADriverPtr->Composite = SMI_Composite; + pSmi->EXADriverPtr->DoneComposite = SMI_DoneComposite; if(!exaDriverInit(pScreen, pSmi->EXADriverPtr)) { @@ -711,38 +707,22 @@ SMI_Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, LEAVE(); } -#define MSOC_ROTBLTWIDTH 8 -static void -SMI501_Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, - int dstX, int dstY, int width, int height) -{ - ENTER(); - - /* SMI501 cannot rotate-blt more than 32 bytes. - * Based on smi's sample smi_shadow.c */ - while (height > MSOC_ROTBLTWIDTH) { - SMI_Composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, - width, MSOC_ROTBLTWIDTH); - srcY += MSOC_ROTBLTWIDTH; - dstY += MSOC_ROTBLTWIDTH; - height -= MSOC_ROTBLTWIDTH; - } - SMI_Composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, width, height); - - LEAVE(); -} - static void SMI730_Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int width, int height) { + ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; + SMIPtr pSmi = SMIPTR(pScrn); int maxPixels; ENTER(); - /* SM731 cannot rotate-blt more than a certain number of pixels - (based on a calculation from the Windows driver source */ - maxPixels = 1280 / pDst->drawable.bitsPerPixel; + /* Both SM501 and SM731 cannot rotate-blt more than a certain + number of pixels. */ + if(IS_MSOC(pSmi)) + maxPixels = 128 / pDst->drawable.bitsPerPixel; + else + maxPixels = 1280 / pDst->drawable.bitsPerPixel; while(height>0){ SMI_Composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, width, min(height, maxPixels)); |