- Add more Composite operations, including Saturate, to Radeon Composite
accel. I don't 100% trust that the math works for Saturate, but I can't tell from existing information. - Fix texture pitch fallback checks. - Fallback when src or mask have transforms. - Disable Radeon Composite accel until the offset thing is fixed. - Set offscreenPitch to 64 on Radeon thanks to new information and a kaa fix. Fixes acceleration at width!=1024.
This commit is contained in:
parent
d15acfa79b
commit
3db761a17b
|
@ -475,12 +475,13 @@ ATIDrawInit(ScreenPtr pScreen)
|
|||
atis->kaa.Blend = R128BlendDMA;
|
||||
atis->kaa.DoneBlend = R128DoneBlendDMA;
|
||||
} else if (!atic->is_r200) {
|
||||
atis->kaa.PrepareBlend = RadeonPrepareBlend;
|
||||
/* XXX: This code is broken so far. */
|
||||
/*atis->kaa.PrepareBlend = RadeonPrepareBlend;
|
||||
atis->kaa.Blend = RadeonBlend;
|
||||
atis->kaa.DoneBlend = RadeonDoneBlend;
|
||||
atis->kaa.PrepareComposite = RadeonPrepareComposite;
|
||||
atis->kaa.Composite = RadeonComposite;
|
||||
atis->kaa.DoneComposite = RadeonDoneComposite;
|
||||
atis->kaa.DoneComposite = RadeonDoneComposite;*/
|
||||
}
|
||||
} else {
|
||||
#else
|
||||
|
@ -501,7 +502,7 @@ ATIDrawInit(ScreenPtr pScreen)
|
|||
atis->kaa.flags = KAA_OFFSCREEN_PIXMAPS;
|
||||
if (atic->is_radeon) {
|
||||
atis->kaa.offscreenByteAlign = 1024;
|
||||
atis->kaa.offscreenPitch = 1024;
|
||||
atis->kaa.offscreenPitch = 64;
|
||||
} else {
|
||||
atis->kaa.offscreenByteAlign = 32;
|
||||
/* Pitch alignment is in sets of 8 pixels, and we need to cover
|
||||
|
|
|
@ -69,6 +69,14 @@ static CARD32 RadeonBlendOp[] = {
|
|||
RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA | RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA,
|
||||
/* Add */
|
||||
RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ONE,
|
||||
/* Saturate */
|
||||
RADEON_SRC_BLEND_GL_SRC_ALPHA_SATURATE | RADEON_DST_BLEND_GL_ONE,
|
||||
/* DisjointClear */
|
||||
RADEON_SRC_BLEND_GL_ZERO | RADEON_DST_BLEND_GL_ZERO,
|
||||
/* DisjointSrc */
|
||||
RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO,
|
||||
/* DisjointDst */
|
||||
RADEON_SRC_BLEND_GL_ZERO | RADEON_DST_BLEND_GL_ONE,
|
||||
};
|
||||
|
||||
/* Compute log base 2 of val. */
|
||||
|
@ -130,9 +138,9 @@ RadeonTextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit)
|
|||
txoffset = ((CARD8 *)pPix->devPrivate.ptr -
|
||||
pScreenPriv->screen->memory_base);
|
||||
|
||||
if ((txoffset & 0x3f) != 0)
|
||||
if ((txoffset & 0x1f) != 0)
|
||||
ATI_FALLBACK(("Bad texture offset 0x%x\n", txoffset));
|
||||
if ((txpitch & 0x3f) != 0)
|
||||
if ((txpitch & 0x1f) != 0)
|
||||
ATI_FALLBACK(("Bad texture pitch 0x%x\n", txpitch));
|
||||
|
||||
/* RADEON_REG_PP_TXFILTER_0, RADEON_REG_PP_TXFORMAT_0,
|
||||
|
@ -173,6 +181,10 @@ RadeonPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
|
|||
/* Check for unsupported compositing operations. */
|
||||
if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
|
||||
ATI_FALLBACK(("Unsupported Composite op 0x%x\n", op));
|
||||
if (pSrcPicture->transform)
|
||||
ATI_FALLBACK(("Source transform unsupported.\n"));
|
||||
if (pMaskPicture && pMaskPicture->transform)
|
||||
ATI_FALLBACK(("Mask transform unsupported.\n"));
|
||||
|
||||
accel_atis = atis;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user