From 65e3d5e45e3d14f4ff98a15af0662e6c6e589cd2 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 14 Jan 2007 21:17:08 +0100 Subject: nouveau: Make the state cache hierarchical. --- src/mesa/drivers/dri/nouveau/nouveau_state_cache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/drivers/dri/nouveau/nouveau_state_cache.c') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c index 36f0c1024b..cb4b9d3027 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c @@ -25,6 +25,8 @@ void nouveau_state_cache_flush(nouveauContextPtr nmesa) do { // jump to a dirty state + while((nmesa->state_cache.hdirty[i/NOUVEAU_STATE_CACHE_HIER_SIZE]==0)&&(istate_cache.atoms[i].dirty==0)&&(istate_cache.atoms[i+j].value); nmesa->state_cache.atoms[i+j].dirty=0; + if ((i+j)%NOUVEAU_STATE_CACHE_HIER_SIZE==0) + nmesa->state_cache.hdirty[(i+j)/NOUVEAU_STATE_CACHE_HIER_SIZE-1]=0; } i+=run; } } while(istate_cache.hdirty[NOUVEAU_STATE_CACHE_HIER_SIZE/NOUVEAU_STATE_CACHE_HIER_SIZE-1]=0; } -- cgit v1.2.3