[Mesa-dev] [PATCH] st/mesa: avoid vertex texture update for 0 case

Dave Airlie airlied at gmail.com
Tue Feb 7 08:36:32 PST 2012


On Tue, Feb 7, 2012 at 4:29 PM, Jakob Bornecrantz <jakob at vmware.com> wrote:
> ----- Original Message -----
>> From: Dave Airlie <airlied at redhat.com>
>>
>> If we had no vertex textures previously and we have none now,
>> don't bother doing the enables dance.
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>>  src/mesa/state_tracker/st_atom_texture.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> Nice find. Does this help performance? Can't we do the same for
> fragment or does it just cost more to check (when this is rarely
> the case) then just doing the rest of the function?

Well I think we generally have a fragment texture so it doesn't save much there,

but I was just playing with noop and nexuiz and saw 0.46 CPU in vertex
texture updates when I knew I had none.

I think we could improve the frag texture updates a fair bit, but I'd
have to a bit more testing on it.

Dave,
(oh I'll fix whitespace in that before pushing).


More information about the mesa-dev mailing list