On Tue, 2008-02-19 at 20:21 +0100, martin f krafft wrote:
>
> also sprach Michel Dänzer <[EMAIL PROTECTED]> [2008.02.19.2007 +0100]:
> > > Yes, using XAA fixes this. Thanks, Michel. Do you know of a good
> > > piece of documentation to read to understand this?
> >
> > The problem is that EXA is falling back to software rendering for the
> > root window because its size exceeds the coordinate limits advertised by
> > the driver (the 3D engine used for RENDER acceleration is limited to
> > 2048 in each dimension).
> >
> > If you're interested in testing patches, it should be possible to handle
> > this more cleverly in the driver - the 2D engine used for window moves
> > can handle up to 8192 in each dimension. We should probably move this to
> > the xorg-driver-ati list for that purpose though.
>
> I am interested in testing patches if it helps you guys. I already
> have X set up with the ATI driver compiled from source from Git, so
> I am ready to go if you tell me which patches to try.
Excellent, can you try the attached one?
--
Earthling Michel Dänzer | http://tungstengraphics.com
Libre software enthusiast | Debian, X and DRI developer
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index 3a36989..3e56c95 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -623,11 +623,11 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting EXA maxPitchBytes\n");
info->exa->maxPitchBytes = 16320;
- info->exa->maxX = info->exa->Composite ? 2048 : 8192;
+ info->exa->maxX = 8192;
#else
- info->exa->maxX = info->exa->Composite ? 2048 : 16320 / 4;
+ info->exa->maxX = 16320 / 4;
#endif
- info->exa->maxY = info->exa->Composite ? 2048 : 8192;
+ info->exa->maxY = 8192;
RADEONEngineInit(pScrn);
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index da1fa47..eb22e30 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -338,41 +338,76 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
}
#ifdef ONLY_ONCE
+
+static PixmapPtr
+RADEONGetDrawablePixmap(DrawablePtr pDrawable)
+{
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ return pDrawable->pScreen->GetWindowPixmap((WindowPtr)pDrawable);
+ else
+ return (PixmapPtr)pDrawable;
+}
+
static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
PicturePtr pMaskPicture, PicturePtr pDstPicture)
{
+ PixmapPtr pSrcPixmap, pDstPixmap;
CARD32 tmp1;
/* Check for unsupported compositing operations. */
if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
- if (pMaskPicture != NULL && pMaskPicture->componentAlpha) {
- /* Check if it's component alpha that relies on a source alpha and on
- * the source value. We can only get one of those into the single
- * source value that we get to blend with.
- */
- if (RadeonBlendOp[op].src_alpha &&
- (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) !=
- RADEON_SRC_BLEND_GL_ZERO)
- {
- RADEON_FALLBACK(("Component alpha not supported with source "
- "alpha and source value blending.\n"));
- }
+ if (!pSrcPicture->pDrawable)
+ return FALSE;
+
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+ if (pSrcPixmap->drawable.width >= 2048 ||
+ pSrcPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
}
- if (pDstPicture->pDrawable->width >= (1 << 11) ||
- pDstPicture->pDrawable->height >= (1 << 11))
- {
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+ if (pDstPixmap->drawable.width >= 2048 ||
+ pDstPixmap->drawable.height >= 2048) {
RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
- pDstPicture->pDrawable->width,
- pDstPicture->pDrawable->height));
+ pDstPixmap->drawable.width,
+ pDstPixmap->drawable.height));
+ }
+
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+ if (pMaskPixmap->drawable.width >= 2048 ||
+ pMaskPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
+
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+ * on the source value. We can only get one of those into the
+ * single source value that we get to blend with.
+ */
+ if (RadeonBlendOp[op].src_alpha &&
+ (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) !=
+ RADEON_SRC_BLEND_GL_ZERO) {
+ RADEON_FALLBACK(("Component alpha not supported with source "
+ "alpha and source value blending.\n"));
+ }
+ }
+
+ if (!R100CheckCompositeTexture(pMaskPicture, 1))
+ return FALSE;
}
if (!R100CheckCompositeTexture(pSrcPicture, 0))
return FALSE;
- if (pMaskPicture != NULL && !R100CheckCompositeTexture(pMaskPicture, 1))
- return FALSE;
if (!RADEONGetDestFormat(pDstPicture, &tmp1))
return FALSE;
@@ -604,32 +639,61 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
PicturePtr pDstPicture)
{
+ PixmapPtr pSrcPixmap, pDstPixmap;
CARD32 tmp1;
TRACE;
- /* Check for unsupported compositing operations. */
- if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
- RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+ if (!pSrcPicture->pDrawable)
+ return FALSE;
+
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
- if (pMaskPicture != NULL && pMaskPicture->componentAlpha) {
- /* Check if it's component alpha that relies on a source alpha and on
- * the source value. We can only get one of those into the single
- * source value that we get to blend with.
- */
- if (RadeonBlendOp[op].src_alpha &&
- (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) !=
- RADEON_SRC_BLEND_GL_ZERO)
- {
- RADEON_FALLBACK(("Component alpha not supported with source "
- "alpha and source value blending.\n"));
+ if (pSrcPixmap->drawable.width >= 2048 ||
+ pSrcPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
+
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+ if (pDstPixmap->drawable.width >= 2048 ||
+ pDstPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
+ pDstPixmap->drawable.width,
+ pDstPixmap->drawable.height));
+ }
+
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+ if (pMaskPixmap->drawable.width >= 2048 ||
+ pMaskPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
}
+
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+ * on the source value. We can only get one of those into the
+ * single source value that we get to blend with.
+ */
+ if (RadeonBlendOp[op].src_alpha &&
+ (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) !=
+ RADEON_SRC_BLEND_GL_ZERO) {
+ RADEON_FALLBACK(("Component alpha not supported with source "
+ "alpha and source value blending.\n"));
+ }
+ }
+
+ if (!R200CheckCompositeTexture(pMaskPicture, 1))
+ return FALSE;
}
if (!R200CheckCompositeTexture(pSrcPicture, 0))
return FALSE;
- if (pMaskPicture != NULL && !R200CheckCompositeTexture(pMaskPicture, 1))
- return FALSE;
if (!RADEONGetDestFormat(pDstPicture, &tmp1))
return FALSE;
@@ -873,9 +937,12 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+ if (!pSrcPicture->pDrawable)
+ return FALSE;
+
#if 1
/* Throw out cases that aren't going to be our rotation first */
- if (pMaskPicture != NULL || op != PictOpSrc || pSrcPicture->pDrawable == NULL)
+ if (pMaskPicture != NULL || op != PictOpSrc)
RADEON_FALLBACK(("Junk driver\n"));
if (pSrcPicture->pDrawable->type != DRAWABLE_WINDOW ||
@@ -900,25 +967,53 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
RADEON_FALLBACK(("src not screen\n"));
#endif
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+ if (pSrcPixmap->drawable.width >= 2048 ||
+ pSrcPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
+
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+ if (pDstPixmap->drawable.width >= 2560 ||
+ pDstPixmap->drawable.height >= 2560) {
+ RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
+ pDstPixmap->drawable.width,
+ pDstPixmap->drawable.height));
+ }
- if (pMaskPicture != NULL && pMaskPicture->componentAlpha) {
- /* Check if it's component alpha that relies on a source alpha and on
- * the source value. We can only get one of those into the single
- * source value that we get to blend with.
- */
- if (RadeonBlendOp[op].src_alpha &&
- (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) !=
- RADEON_SRC_BLEND_GL_ZERO)
- {
- RADEON_FALLBACK(("Component alpha not supported with source "
- "alpha and source value blending.\n"));
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+ if (pMaskPixmap->drawable.width >= 2048 ||
+ pMaskPixmap->drawable.height >= 2048) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
+
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+ * on the source value. We can only get one of those into the
+ * single source value that we get to blend with.
+ */
+ if (RadeonBlendOp[op].src_alpha &&
+ (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) !=
+ RADEON_SRC_BLEND_GL_ZERO) {
+ RADEON_FALLBACK(("Component alpha not supported with source "
+ "alpha and source value blending.\n"));
+ }
}
+
+ if (!R300CheckCompositeTexture(pMaskPicture, 1))
+ return FALSE;
}
if (!R300CheckCompositeTexture(pSrcPicture, 0))
return FALSE;
- if (pMaskPicture != NULL && !R300CheckCompositeTexture(pMaskPicture, 1))
- return FALSE;
if (!R300GetDestFormat(pDstPicture, &tmp1))
return FALSE;
_______________________________________________
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati