diff options
-rw-r--r-- | src/smi_exa.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/smi_exa.c b/src/smi_exa.c index 5453539..c77ac7f 100644 --- a/src/smi_exa.c +++ b/src/smi_exa.c @@ -65,6 +65,9 @@ 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 @@ -153,7 +156,9 @@ SMI_EXAInit(ScreenPtr pScreen) pSmi->EXADriverPtr->CheckComposite = SMI_CheckComposite; pSmi->EXADriverPtr->PrepareComposite = SMI_PrepareComposite; - if (pSmi->Chipset == SMI_COUGAR3DR) + if (IS_MSOC(pSmi)) + pSmi->EXADriverPtr->Composite = SMI501_Composite; + else if (pSmi->Chipset == SMI_COUGAR3DR) pSmi->EXADriverPtr->Composite = SMI730_Composite; else pSmi->EXADriverPtr->Composite = SMI_Composite; @@ -644,6 +649,27 @@ 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) |