xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Thu Dec 4 12:39:21 PST 2008


 src/radeon_textured_videofuncs.c |   30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 82d67b70d0fb747cf7b1eb0b64244ae56cb84572
Author: Pierre Ossman <pierre at ossman.eu>
Date:   Thu Dec 4 15:38:13 2008 -0500

    Switch r200 Xv to use rect lists rather than quads to avoid tearing
    
    Patch from Pierre with fixes from me.

diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index 151dab6..86532b5 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -1519,34 +1519,40 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
 		     RADEON_CP_VC_CNTL_MAOS_ENABLE |
 		     RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE |
 		     (3 << RADEON_CP_VC_CNTL_NUM_SHIFT));
-	} else {
-	    if (IS_R300_3D || IS_R500_3D)
+	} else if (IS_R300_3D || IS_R500_3D) {
 		BEGIN_RING(4 * vtx_count + 4);
-	    else
-		BEGIN_RING(4 * vtx_count + 2);
+		OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2,
+				    4 * vtx_count));
+		OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_QUAD_LIST |
+			 RADEON_CP_VC_CNTL_PRIM_WALK_RING |
+			 (4 << RADEON_CP_VC_CNTL_NUM_SHIFT));
+	} else {
+	    BEGIN_RING(3 * vtx_count + 2);
 	    OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2,
-				4 * vtx_count));
-	    OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_QUAD_LIST |
+				3 * vtx_count));
+	    OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST |
 		     RADEON_CP_VC_CNTL_PRIM_WALK_RING |
-		     (4 << RADEON_CP_VC_CNTL_NUM_SHIFT));
+		     (3 << RADEON_CP_VC_CNTL_NUM_SHIFT));
 	}
 #else /* ACCEL_CP */
 	if (IS_R300_3D || IS_R500_3D)
 	    BEGIN_ACCEL(2 + vtx_count * 4);
-	else if (info->ChipFamily < CHIP_FAMILY_R200)
-	    BEGIN_ACCEL(1 + vtx_count * 3);
 	else
-	    BEGIN_ACCEL(1 + vtx_count * 4);
+	    BEGIN_ACCEL(1 + vtx_count * 3);
 
 	if (info->ChipFamily < CHIP_FAMILY_R200)
 	    OUT_ACCEL_REG(RADEON_SE_VF_CNTL, (RADEON_VF_PRIM_TYPE_RECTANGLE_LIST |
 					      RADEON_VF_PRIM_WALK_DATA |
 					      RADEON_VF_RADEON_MODE |
 					      (3 << RADEON_VF_NUM_VERTICES_SHIFT)));
-	else
+	else if (IS_R300_3D || IS_R500_3D)
 	    OUT_ACCEL_REG(RADEON_SE_VF_CNTL, (RADEON_VF_PRIM_TYPE_QUAD_LIST |
 					      RADEON_VF_PRIM_WALK_DATA |
 					      (4 << RADEON_VF_NUM_VERTICES_SHIFT)));
+	else
+	    OUT_ACCEL_REG(RADEON_SE_VF_CNTL, (RADEON_VF_PRIM_TYPE_RECTANGLE_LIST |
+					      RADEON_VF_PRIM_WALK_DATA |
+					      (3 << RADEON_VF_NUM_VERTICES_SHIFT)));
 
 #endif
 	if (pPriv->bicubic_enabled) {
@@ -1563,7 +1569,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
 		xFixedToFloat(srcTopRight.x) / info->accel_state->texW[0],     xFixedToFloat(srcTopRight.y) / info->accel_state->texH[0],
 		xFixedToFloat(srcTopRight.x) + 0.5,               xFixedToFloat(srcTopRight.y) + 0.5);
 	} else {
-		if (info->ChipFamily >= CHIP_FAMILY_R200) {
+		if (IS_R300_3D || IS_R500_3D) {
 			VTX_OUT((float)dstX,                              (float)dstY,
 			xFixedToFloat(srcTopLeft.x) / info->accel_state->texW[0],      xFixedToFloat(srcTopLeft.y) / info->accel_state->texH[0]);
 		}


More information about the xorg-commit mailing list