From 5562fe653cf88454bbf2c50f77a8b56b0dafe01b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 25 Sep 2004 07:00:15 +0000 Subject: The previous code would emit a full set of state during the first EmitState on a new cmdbuf, to ensure that state wasn't lost across UNLOCK/LOCK pairs (in the case of context switching). This was rather inefficient. Instead, after flushing a cmdbuf, mark the state as needing to be saved on unlock. Then, at the beginning of flushing a cmdbuf, if we actually have lost the context, go back and emit a new cmdbuf with the full set of state, before continuing with the cmdbuf flush. Provides a 10-15% improvement in ipers performance in my tests, along with other apps. Tested with: ipers, glxgears, quake3 --- src/mesa/drivers/dri/radeon/radeon_texmem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/radeon/radeon_texmem.c') diff --git a/src/mesa/drivers/dri/radeon/radeon_texmem.c b/src/mesa/drivers/dri/radeon/radeon_texmem.c index 235df8dcd1..c075c2c562 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texmem.c +++ b/src/mesa/drivers/dri/radeon/radeon_texmem.c @@ -41,7 +41,6 @@ SOFTWARE. #include "imports.h" #include "context.h" #include "macros.h" -#include "simple_list.h" #include "radeon_context.h" #include "radeon_ioctl.h" @@ -66,8 +65,7 @@ radeonDestroyTexObj( radeonContextPtr rmesa, radeonTexObjPtr t ) for ( i = 0 ; i < rmesa->glCtx->Const.MaxTextureUnits ; i++ ) { if ( t == rmesa->state.texture.unit[i].texobj ) { rmesa->state.texture.unit[i].texobj = NULL; - remove_from_list( &rmesa->hw.tex[i] ); - make_empty_list( &rmesa->hw.tex[i] ); + rmesa->hw.tex[i].dirty = GL_FALSE; } } } -- cgit v1.2.3