diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2013-01-11 09:52:32 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2013-01-11 09:55:54 -0500 |
commit | 102ee4a24e4c9ba0c0b65d3ca8599dc7e0216c1e (patch) | |
tree | f814d7af5cea55f57cc62b20c6aecc7dd1efa945 | |
parent | 47689ef8b878a56ea094e21a6090b228e67d605e (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>
-rw-r--r-- | src/radeon_exa_render.c | 32 | ||||
-rw-r--r-- | src/radeon_textured_videofuncs.c | 8 |
2 files changed, 20 insertions, 20 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(); diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index cfac9022..653de44d 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -55,8 +55,8 @@ RADEONPrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) uint32_t dst_pitch, dst_format; uint32_t colorpitch; int pixel_shift; - int scissor_w = MIN(pPixmap->drawable.width, 2047); - int scissor_h = MIN(pPixmap->drawable.height, 2047); + int scissor_w = MIN(pPixmap->drawable.width, 2048) - 1; + int scissor_h = MIN(pPixmap->drawable.height, 2048) - 1; int ret; radeon_cs_space_reset_bos(info->cs); @@ -416,8 +416,8 @@ R200PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) uint32_t dst_pitch, dst_format; uint32_t colorpitch; int pixel_shift; - int scissor_w = MIN(pPixmap->drawable.width, 2047); - int scissor_h = MIN(pPixmap->drawable.height, 2047); + int scissor_w = MIN(pPixmap->drawable.width, 2048) - 1; + int scissor_h = MIN(pPixmap->drawable.height, 2048) - 1; /* note: in contrast to r300, use input biasing on uv components */ const float Loff = -0.0627; float uvcosf, uvsinf; |