[Mesa-dev] unpack functions showing up highly in profiles
Matt Turner
mattst88 at gmail.com
Sat Mar 17 18:55:46 PDT 2012
Hey
On my i965/SNB system I profiled some games in WINE and saw that some
unpack_* functions in src/mesa/main/format_unpack.c show up very
highly.
In Day of Defeat: Source and Counter Strike: Source, the
_mesa_unpack_uint_z_row function was 10~30%.
In Starcraft II, the unpack_ARGB8888 function was 66%!
I imagine we could optimize them by checking the value of 'n' and
unrolling the loops if it's large enough, but I suspect the thing to
do is figure out why they're being called so much to begin with and
fix that. Any ideas?
I'm also curious, in the case of unpack_ARGB8888 why does the (texture
data?) have to be converted from byte integers to floats to begin
with? Can't we use the integer data directly, or is this an
inefficiency of WINE?
Thanks,
Matt
More information about the mesa-dev
mailing list