From f3e68d4b7afd2e23675bf6361c496814c9cb4b94 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 11 Apr 2008 10:59:07 -0400 Subject: Fix exa glyph corruption on newer chips --- src/radeon_exa_render.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 2bc2c659..c1ea4d2c 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -1888,8 +1888,10 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst, RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | (4 << RADEON_CP_VC_CNTL_NUM_SHIFT)); } else { - if (IS_R300_3D || IS_R500_3D) + if (IS_R300_3D) BEGIN_RING(4 * vtx_count + 4); + else if (IS_R500_3D) + BEGIN_RING(4 * vtx_count + 6); else BEGIN_RING(4 * vtx_count + 2); @@ -1901,8 +1903,10 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst, } #else /* ACCEL_CP */ - if (IS_R300_3D || IS_R500_3D) + if (IS_R300_3D) BEGIN_ACCEL(2 + vtx_count * 4); + else if (IS_R500_3D) + BEGIN_ACCEL(3 + vtx_count * 4); else BEGIN_ACCEL(1 + vtx_count * 4); @@ -1931,9 +1935,14 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst, xFixedToFloat(srcTopRight.x) / info->texW[0], xFixedToFloat(srcTopRight.y) / info->texH[0], xFixedToFloat(maskTopRight.x) / info->texW[1], xFixedToFloat(maskTopRight.y) / info->texH[1]); - if (IS_R300_3D || IS_R500_3D) + if (IS_R300_3D) /* flushing is pipelined, free/finish is not */ OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D); + else if (IS_R500_3D) { + /* r500 shows corruption on small things like glyphs without a 3D idle */ + OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); + } #ifdef ACCEL_CP ADVANCE_RING(); -- cgit v1.2.3