From 23788c4a5e3b6affb9b183e1393edd0e5ca4550e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 27 Oct 2011 19:12:22 +0200 Subject: EXA < R6xx: Make sure 2D state is re-emitted after running out of CS space. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise it's basically luck what the 2D state ends up being at the beginning of the next CS. Signed-off-by: Michel Dänzer --- src/radeon_exa_funcs.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index 52adcea6..058a547b 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -132,14 +132,13 @@ static void FUNC_NAME(Emit2DState)(ScrnInfoPtr pScrn, int op) } static void -FUNC_NAME(RADEONDone2D)(PixmapPtr pPix) +FUNC_NAME(RADEONFlush2D)(PixmapPtr pPix) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); ACCEL_PREAMBLE(); TRACE; - info->state_2d.op = 0; BEGIN_ACCEL(2); OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); OUT_ACCEL_REG(RADEON_WAIT_UNTIL, @@ -147,6 +146,15 @@ FUNC_NAME(RADEONDone2D)(PixmapPtr pPix) FINISH_ACCEL(); } +static void +FUNC_NAME(RADEONDone2D)(PixmapPtr pPix) +{ + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + info->state_2d.op = 0; + + FUNC_NAME(RADEONFlush2D)(pPix); +} + static Bool FUNC_NAME(RADEONPrepareSolid)(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) { @@ -220,7 +228,7 @@ FUNC_NAME(RADEONSolid)(PixmapPtr pPix, int x1, int y1, int x2, int y2) #if defined(ACCEL_CP) && defined(XF86DRM_MODE) if (info->cs && CS_FULL(info->cs)) { - FUNC_NAME(RADEONDone2D)(info->accel_state->dst_pix); + FUNC_NAME(RADEONFlush2D)(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); } #endif @@ -332,7 +340,7 @@ FUNC_NAME(RADEONCopy)(PixmapPtr pDst, #if defined(ACCEL_CP) && defined(XF86DRM_MODE) if (info->cs && CS_FULL(info->cs)) { - FUNC_NAME(RADEONDone2D)(info->accel_state->dst_pix); + FUNC_NAME(RADEONFlush2D)(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); } #endif -- cgit v1.2.3