st/mesa: only memset sampler when about to use it.
authorDave Airlie <airlied@redhat.com>
Sun, 15 May 2011 23:44:10 +0000 (09:44 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 18 May 2011 07:31:51 +0000 (17:31 +1000)
commit6bd8647b54054a59bdb4f0c170c4481eaadc81ff
tree28b5a3e33743063fe2d3dedae24ef78d8860b49f
parentecc051d65b6e17115439fb3609cccfd59f6272bf
st/mesa: only memset sampler when about to use it.

This function was taking a lot more CPU than required due to it memsetting
a bunch of memory that didn't require it from what I can see.

We should only memset here when we are about to fill out the sampler,
otherwise we end up doing a bunch of memsets for everytime this function
is called, basically setting 0 memory to 0.

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