summaryrefslogtreecommitdiff
path: root/src/radeon_exa_render.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2013-01-11 09:52:32 -0500
committerAlex Deucher <alexdeucher@gmail.com>2013-01-11 09:55:54 -0500
commit102ee4a24e4c9ba0c0b65d3ca8599dc7e0216c1e (patch)
treef814d7af5cea55f57cc62b20c6aecc7dd1efa945 /src/radeon_exa_render.c
parent47689ef8b878a56ea094e21a6090b228e67d605e (diff)
radeon/r200: program RE_WIDTH_HEIGHT properly
Values are inclusive. Mesa already sets these correctly. Also bump EXA/Xv limits from 2047 to 2048. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r--src/radeon_exa_render.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 263a2b46..1f6b86df 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -473,8 +473,8 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
- if (pDstPixmap->drawable.width > 2047 ||
- pDstPixmap->drawable.height > 2047) {
+ 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));
@@ -486,8 +486,8 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
*/
pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
- if (pSrcPixmap->drawable.width > 2047 ||
- pSrcPixmap->drawable.height > 2047) {
+ 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));
@@ -501,8 +501,8 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
if (pMaskPicture->pDrawable) {
pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- if (pMaskPixmap->drawable.width > 2047 ||
- pMaskPixmap->drawable.height > 2047) {
+ 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));
@@ -692,8 +692,8 @@ static Bool R100PrepareComposite(int op,
OUT_RING_REG(RADEON_RB3D_BLENDCNTL, blendcntl);
OUT_RING_REG(RADEON_RE_TOP_LEFT, 0);
- OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width) << RADEON_RE_WIDTH_SHIFT) |
- ((pDst->drawable.height) << RADEON_RE_HEIGHT_SHIFT)));
+ OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width - 1) << RADEON_RE_WIDTH_SHIFT) |
+ ((pDst->drawable.height - 1) << RADEON_RE_HEIGHT_SHIFT)));
ADVANCE_RING();
return TRUE;
@@ -872,8 +872,8 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
- if (pDstPixmap->drawable.width > 2047 ||
- pDstPixmap->drawable.height > 2047) {
+ 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));
@@ -885,8 +885,8 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
*/
pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
- if (pSrcPixmap->drawable.width > 2047 ||
- pSrcPixmap->drawable.height > 2047) {
+ 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));
@@ -900,8 +900,8 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
if (pMaskPicture->pDrawable) {
pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- if (pMaskPixmap->drawable.width > 2047 ||
- pMaskPixmap->drawable.height > 2047) {
+ 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));
@@ -1063,8 +1063,8 @@ static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture,
blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format);
OUT_RING_REG(RADEON_RB3D_BLENDCNTL, blendcntl);
- OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width) << RADEON_RE_WIDTH_SHIFT) |
- ((pDst->drawable.height) << RADEON_RE_HEIGHT_SHIFT)));
+ OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width - 1) << RADEON_RE_WIDTH_SHIFT) |
+ ((pDst->drawable.height - 1) << RADEON_RE_HEIGHT_SHIFT)));
ADVANCE_RING();