diff options
author | Alex Deucher <alex@samba.(none)> | 2008-03-19 12:45:01 -0400 |
---|---|---|
committer | Alex Deucher <alex@samba.(none)> | 2008-03-19 12:45:01 -0400 |
commit | b6aa4279cbe68cc8e4523795e9714fb798b62d98 (patch) | |
tree | bd1d97829cb516333fc70667ce40883735623af9 /src | |
parent | 4a445a3e8c4c5ecd9d4ef8daa26906c3ceaa94a1 (diff) |
R5xx: bump textured video limits to 4096
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_exa_render.c | 4 | ||||
-rw-r--r-- | src/radeon_textured_video.c | 20 | ||||
-rw-r--r-- | src/radeon_textured_videofuncs.c | 10 |
3 files changed, 29 insertions, 5 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index f2f38c32..c881a282 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -345,7 +345,7 @@ RADEONGetDrawablePixmap(DrawablePtr pDrawable) return pDrawable->pScreen->GetWindowPixmap((WindowPtr)pDrawable); else return (PixmapPtr)pDrawable; -} +} static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) @@ -435,7 +435,7 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, RADEONInit3DEngine(pScrn); if (!RADEONGetDestFormat(pDstPicture, &dst_format)) - return FALSE; + return FALSE; pixel_shift = pDst->drawable.bitsPerPixel >> 4; diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 05dd20e4..0a6598d7 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -46,6 +46,9 @@ #define IMAGE_MAX_WIDTH 2048 #define IMAGE_MAX_HEIGHT 2048 +#define IMAGE_MAX_WIDTH_R500 4096 +#define IMAGE_MAX_HEIGHT_R500 4096 + static Bool RADEONTilingEnabled(ScrnInfoPtr pScrn, PixmapPtr pPix) { @@ -300,6 +303,16 @@ static XF86VideoEncodingRec DummyEncoding[1] = } }; +static XF86VideoEncodingRec DummyEncodingR500[1] = +{ + { + 0, + "XV_IMAGE", + IMAGE_MAX_WIDTH_R500, IMAGE_MAX_HEIGHT_R500, + {1, 1} + } +}; + #define NUM_FORMATS 3 static XF86VideoFormatRec Formats[NUM_FORMATS] = @@ -326,6 +339,8 @@ static XF86ImageRec Images[NUM_IMAGES] = XF86VideoAdaptorPtr RADEONSetupImageTexturedVideo(ScreenPtr pScreen) { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPortPriv; XF86VideoAdaptorPtr adapt; int i; @@ -340,7 +355,10 @@ RADEONSetupImageTexturedVideo(ScreenPtr pScreen) adapt->flags = 0; adapt->name = "Radeon Textured Video"; adapt->nEncodings = 1; - adapt->pEncodings = DummyEncoding; + if (IS_R500_3D) + adapt->pEncodings = DummyEncodingR500; + else + adapt->pEncodings = DummyEncoding; adapt->nFormats = NUM_FORMATS; adapt->pFormats = Formats; adapt->nPorts = num_texture_ports; diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index 83025090..6a2b8e12 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -160,8 +160,8 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv txformat1 |= R300_TX_FORMAT_YUV_TO_RGB_CLAMP; - txformat0 = (((pPriv->w - 1) << R300_TXWIDTH_SHIFT) | - ((pPriv->h - 1) << R300_TXHEIGHT_SHIFT)); + txformat0 = ((((pPriv->w - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | + (((pPriv->h - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT)); txformat0 |= R300_TXPITCH_EN; @@ -176,6 +176,12 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv txpitch = pPriv->src_pitch / 2; txpitch -= 1; + if (IS_R500_3D && ((pPriv->w - 1) & 0x800)) + txpitch |= R500_TXWIDTH_11; + + if (IS_R500_3D && ((pPriv->h - 1) & 0x800)) + txpitch |= R500_TXHEIGHT_11; + txoffset = pPriv->src_offset; BEGIN_VIDEO(6); |