diff options
-rw-r--r-- | src/radeon.h | 19 | ||||
-rw-r--r-- | src/radeon_exa_funcs.c | 4 | ||||
-rw-r--r-- | src/radeon_exa_render.c | 18 | ||||
-rw-r--r-- | src/radeon_textured_videofuncs.c | 4 |
4 files changed, 27 insertions, 18 deletions
diff --git a/src/radeon.h b/src/radeon.h index a67f375c..8ebb3b3d 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -271,7 +271,7 @@ typedef enum { CHIP_FAMILY_RV570, /* rv570 */ CHIP_FAMILY_RS690, CHIP_FAMILY_RS740, - CHIP_FAMILY_R600, /* r60 */ + CHIP_FAMILY_R600, /* r600 */ CHIP_FAMILY_R630, CHIP_FAMILY_RV610, CHIP_FAMILY_RV630, @@ -303,6 +303,23 @@ typedef enum { #define IS_DCE3_VARIANT ((info->ChipFamily >= CHIP_FAMILY_RV620)) +#define IS_R500_3D ((info->ChipFamily == CHIP_FAMILY_RV515) || \ + (info->ChipFamily == CHIP_FAMILY_R520) || \ + (info->ChipFamily == CHIP_FAMILY_RV530) || \ + (info->ChipFamily == CHIP_FAMILY_R580) || \ + (info->ChipFamily == CHIP_FAMILY_RV560) || \ + (info->ChipFamily == CHIP_FAMILY_RV570)) + +#define IS_R300_3D ((info->ChipFamily == CHIP_FAMILY_R300) || \ + (info->ChipFamily == CHIP_FAMILY_RV350) || \ + (info->ChipFamily == CHIP_FAMILY_R350) || \ + (info->ChipFamily == CHIP_FAMILY_RV380) || \ + (info->ChipFamily == CHIP_FAMILY_R420) || \ + (info->ChipFamily == CHIP_FAMILY_RV410) || \ + (info->ChipFamily == CHIP_FAMILY_RS690) || \ + (info->ChipFamily == CHIP_FAMILY_RS740) || \ + (info->ChipFamily == CHIP_FAMILY_RS400)) + /* * Errata workarounds */ diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index 84beec35..d5ee5a67 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -536,9 +536,9 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) if (info->ChipFamily >= CHIP_FAMILY_R600) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration " "unsupported on R600 and newer cards.\n"); - else if (IS_R300_VARIANT || (IS_AVIVO_VARIANT && info->ChipFamily <= CHIP_FAMILY_RS740)) { + else if (IS_R300_3D || IS_R500_3D) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration " - "enabled for R300 type cards.\n"); + "enabled for R300/R400/R500 type cards.\n"); info->exa->CheckComposite = R300CheckComposite; info->exa->PrepareComposite = FUNC_NAME(R300PrepareComposite); diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index c3ad7a5e..f2f38c32 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -888,10 +888,10 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txformat0 = ((((w - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | (((h - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT)); - if (IS_AVIVO_VARIANT && ((w - 1) & 0x800)) + if (IS_R500_3D && ((w - 1) & 0x800)) txpitch |= R500_TXWIDTH_11; - if (IS_AVIVO_VARIANT && ((h - 1) & 0x800)) + if (IS_R500_3D && ((h - 1) & 0x800)) txpitch |= R500_TXHEIGHT_11; if (pPict->repeat) { @@ -952,7 +952,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; RADEONInfoPtr info = RADEONPTR(pScrn); int max_tex_w, max_tex_h, max_dst_w, max_dst_h; - Bool is_r500; TRACE; @@ -962,10 +961,7 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); - is_r500 = ((info->ChipFamily >= CHIP_FAMILY_RV515) && - (info->ChipFamily <= CHIP_FAMILY_RV570)); - - if (is_r500) { + if (IS_R500_3D) { max_tex_w = 4096; max_tex_h = 4096; max_dst_w = 4096; @@ -1016,11 +1012,11 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP } } - if (!R300CheckCompositeTexture(pMaskPicture, 1, is_r500)) + if (!R300CheckCompositeTexture(pMaskPicture, 1, IS_R500_3D)) return FALSE; } - if (!R300CheckCompositeTexture(pSrcPicture, 0, is_r500)) + if (!R300CheckCompositeTexture(pSrcPicture, 0, IS_R500_3D)) return FALSE; if (!R300GetDestFormat(pDstPicture, &tmp1)) @@ -1316,9 +1312,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, FINISH_ACCEL(); /* setup pixel shader */ - if (IS_R300_VARIANT || - (info->ChipFamily == CHIP_FAMILY_RS690) || - (info->ChipFamily == CHIP_FAMILY_RS740)) { + if (IS_R300_3D) { CARD32 output_fmt; int src_color, src_alpha; int mask_color, mask_alpha; diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index 647fa808..83025090 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -340,9 +340,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv FINISH_VIDEO(); /* setup pixel shader */ - if (IS_R300_VARIANT || - (info->ChipFamily == CHIP_FAMILY_RS690) || - (info->ChipFamily == CHIP_FAMILY_RS740)) { + if (IS_R300_3D) { BEGIN_VIDEO(16); OUT_VIDEO_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | |