Message info
 
To:Brian Paul From:Matt Turner Subject:Re: [Mesa-dev] unpack functions showing up highly in profiles Date:Sun, 18 Mar 2012 12:47:35 -0400
 

On Sun, Mar 18, 2012 at 10:13 AM, Brian Paul <brian.e.paul@gmail.com> wrote:
> On Sat, Mar 17, 2012 at 7:55 PM, Matt Turner <mattst88@gmail.com> wrote:
>> 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?
>
> Yes, let's try to find out why/where this function is getting called
> from. How about attaching a debugger to the process and setting a
> breakpoint on those functions, then looking at the call stack?

I pasted the functions wrong. SC2 spends an enormous amount of time in
unpack_uint_z_X8_Z24 and the HL2 games in unpack_ARGB8888.

SC2's call chain for unpack_uint_z_X8_Z24 is

unpack_uint_z_X8_Z24
- _mesa_unpack_uint_z_row
- _mesa_readpixels
- intelReadPixels
- copy_tex_sub_image.isra.3
- intelCopyTexSubImage2D
- copyteximage
- shared_dispatch_stub_324
- surface_load_ds_location
- drawPrimitive
- wined3d_device_draw_indexed_primitive
- IDirect3DDevice9Impl_DrawIndexedPrimitive
- ??

Matt
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev