OSDN Git Service

The previous code would emit a full set of state during the first EmitState on
authorEric Anholt <anholt@FreeBSD.org>
Sat, 25 Sep 2004 07:00:15 +0000 (07:00 +0000)
committerEric Anholt <anholt@FreeBSD.org>
Sat, 25 Sep 2004 07:00:15 +0000 (07:00 +0000)
commit5562fe653cf88454bbf2c50f77a8b56b0dafe01b
tree159ffb9f519e550e45fc9442c9f21e557e19c681
parent4010481ba3bce98d95a20e9a061fb62922bdcb83
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_compat.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/drivers/dri/radeon/radeon_context.h
src/mesa/drivers/dri/radeon/radeon_ioctl.c
src/mesa/drivers/dri/radeon/radeon_ioctl.h
src/mesa/drivers/dri/radeon/radeon_lock.c
src/mesa/drivers/dri/radeon/radeon_lock.h
src/mesa/drivers/dri/radeon/radeon_state_init.c
src/mesa/drivers/dri/radeon/radeon_subset_tex.c
src/mesa/drivers/dri/radeon/radeon_texmem.c