OSDN Git Service

st/mesa: avoid vertex texture and sampler updates for 0 case
authorDave Airlie <airlied@redhat.com>
Tue, 7 Feb 2012 16:18:05 +0000 (16:18 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 8 Feb 2012 12:12:10 +0000 (12:12 +0000)
commit833a33bf6e085a79ec74c5f296a8e55ebec9f9b5
treeb14c8bcd614ab3b3d64fa0272e09f7ebe2149034
parent33f4461ec9e35b8de13d68b628dc1b0854c2314c
st/mesa: avoid vertex texture and sampler updates for 0 case

If we had no vertex textures or samplers previously and we have none now,
don't bother doing the enables dance.

I was profiling nexuiz on noop and noticed these two functions in the
profile, this drops their usage from 0.86% to 0.03% and 0.23% to 0.03%
for texture and samplers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_atom_texture.c