diff options
author | Brian Paul <[email protected]> | 2010-03-22 09:07:46 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-03-22 09:07:46 -0600 |
commit | 182c42c8da6edfa66819eef02f4dea310c1f68d7 (patch) | |
tree | f49df694eae81c9db3c8fe2123bb30ef5a556891 /src/mesa/drivers/dri/r200 | |
parent | 5cb4a3524b54480418b4c4717c4a0f0a8669939c (diff) | |
parent | ca97f8b9bab80844be613a9253643b7da8e738c7 (diff) |
Merge branch '7.8'
Conflicts:
src/gallium/drivers/cell/ppu/cell_screen.c
src/mesa/state_tracker/st_cb_drawpixels.c
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_cmdbuf.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_tcl.c | 56 |
2 files changed, 35 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c index 2f2b8d94dca..ad43a8ca920 100644 --- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c +++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c @@ -189,7 +189,8 @@ void r200FlushElts(GLcontext *ctx) if (R200_ELT_BUF_SZ > elt_used) radeonReturnDmaRegion(&rmesa->radeon, R200_ELT_BUF_SZ - elt_used); - if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)) { + if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL) + && !rmesa->radeon.radeonScreen->kernel_mm) { radeon_print(RADEON_SYNC, RADEON_NORMAL, "%s: Syncing\n", __FUNCTION__); radeonFinish( rmesa->radeon.glCtx ); } diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c index f3f558b7def..d43e14581e9 100644 --- a/src/mesa/drivers/dri/r200/r200_tcl.c +++ b/src/mesa/drivers/dri/r200/r200_tcl.c @@ -404,8 +404,9 @@ static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev ) rendering code may decide convert to elts. In that case we have to make pessimistic prediction. and use larger of 2 paths. */ - const GLuint elts = ELTS_BUFSZ(nr_aos); - const GLuint index = INDEX_BUFSZ; + const GLuint elt_count =(VB->Primitive[i].count/GET_MAX_HW_ELTS() + 1); + const GLuint elts = ELTS_BUFSZ(nr_aos) * elt_count; + const GLuint index = INDEX_BUFSZ * elt_count; const GLuint vbuf = VBUF_BUFSZ; if ( (!VB->Elts && VB->Primitive[i].count >= MAX_CONVERSION_SIZE) || vbuf > index + elts) @@ -687,25 +688,34 @@ static char *getFallbackString(GLuint bit) void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) { - r200ContextPtr rmesa = R200_CONTEXT(ctx); - GLuint oldfallback = rmesa->radeon.TclFallback; - - if (mode) { - rmesa->radeon.TclFallback |= bit; - if (oldfallback == 0) { - if (R200_DEBUG & RADEON_FALLBACKS) - fprintf(stderr, "R200 begin tcl fallback %s\n", - getFallbackString( bit )); - transition_to_swtnl( ctx ); - } - } - else { - rmesa->radeon.TclFallback &= ~bit; - if (oldfallback == bit) { - if (R200_DEBUG & RADEON_FALLBACKS) - fprintf(stderr, "R200 end tcl fallback %s\n", - getFallbackString( bit )); - transition_to_hwtnl( ctx ); - } - } + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint oldfallback = rmesa->radeon.TclFallback; + + if (mode) { + if (oldfallback == 0) { + /* We have to flush before transition */ + if ( rmesa->radeon.dma.flush ) + rmesa->radeon.dma.flush( rmesa->radeon.glCtx ); + + if (R200_DEBUG & RADEON_FALLBACKS) + fprintf(stderr, "R200 begin tcl fallback %s\n", + getFallbackString( bit )); + rmesa->radeon.TclFallback |= bit; + transition_to_swtnl( ctx ); + } else + rmesa->radeon.TclFallback |= bit; + } else { + if (oldfallback == bit) { + /* We have to flush before transition */ + if ( rmesa->radeon.dma.flush ) + rmesa->radeon.dma.flush( rmesa->radeon.glCtx ); + + if (R200_DEBUG & RADEON_FALLBACKS) + fprintf(stderr, "R200 end tcl fallback %s\n", + getFallbackString( bit )); + rmesa->radeon.TclFallback &= ~bit; + transition_to_hwtnl( ctx ); + } else + rmesa->radeon.TclFallback &= ~bit; + } } |