i965: avoid memsetting all the BRW_WM_MAX_INSN arrays for every compile.
authorEric Anholt <eric@anholt.net>
Tue, 10 Nov 2009 23:51:29 +0000 (15:51 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 11 Nov 2009 00:00:30 +0000 (16:00 -0800)
commitc5413839b3e99c7b162f1260142f3c175502b0ce
tree0f849b3db0283418d5b511de98ae8758ceecb108
parenteb6a1f8a00596156cd7164838ef9e9a5b39e7254
i965: avoid memsetting all the BRW_WM_MAX_INSN arrays for every compile.

For an app that's blowing out the state cache, like sauerbraten, the
memset of the giant arrays ended up taking 11% of the CPU even when only a
"few" of the entries got used.  With this, the WM program compile drops back
down to 1% of CPU time.

Bug #24981 (bisected to BRW_WM_MAX_INSN increase).
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/drivers/dri/i965/brw_wm_fp.c
src/mesa/drivers/dri/i965/brw_wm_pass0.c