diff options
author | Eric Anholt <[email protected]> | 2004-09-22 06:27:02 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2004-09-22 06:27:02 +0000 |
commit | 0c8f8d3dc9d60ed34eeca7f3606651420a81753c (patch) | |
tree | 3876839944c4194d4eac39863e96b64c4cfd7683 /src/mesa/drivers/dri/r200/r200_lock.h | |
parent | 029ee9c680cd097b82d3d301b3854d57993d4464 (diff) |
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. Also, remove the dirty/clean atom lists, since atoms are
emitted in a fixed order these days, and go with a simpler single list.
Provides a 14% improvement in ipers performance in my tests, along with other
apps.
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_lock.h')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_lock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_lock.h b/src/mesa/drivers/dri/r200/r200_lock.h index 587e4fe5ccd..908052659c1 100644 --- a/src/mesa/drivers/dri/r200/r200_lock.h +++ b/src/mesa/drivers/dri/r200/r200_lock.h @@ -104,6 +104,10 @@ extern int prevLockLine; rmesa->dri.hwLock, \ rmesa->dri.hwContext ); \ DEBUG_RESET(); \ + if (rmesa->save_on_next_unlock) { \ + r200SaveHwState( rmesa ); \ + rmesa->save_on_next_unlock = GL_FALSE; \ + } \ } while (0) #endif |