Chris Ison wrote:
ok, looking of the oprofile output of libgl, r200_dri and qw-client-glx, I decided to hunt for the function

texsubimage2d_bgr888_to_rgba8888 which is at the top of the list at 22.6% of the time.



I have tracked down the function to a define, but from there I don't know where it comes from

from ./src/mesa/main/texutil.c

#define CONVERT_RGBA8888( name )     \
static GLboolean       \
convert_##name##_rgba8888( const struct convert_info *convert )  \



this function sets

   else if ( convert->format == GL_RGB &&    \
      convert->type == GL_UNSIGNED_BYTE )   \
   {         \
      tab = name##_tab_bgr888_to_rgba8888;    \
   }         \



and the end of the function does

return tab[index]( convert );



but I cannot find for the life of me where the value/array/what ever tab gets set to is comming from, a grep for bgr888_to_rgba8888 only reveils



[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ~/Mesa
$ grep -r bgr888_to_rgba8888 .
./src/mesa/main/texutil.c:#define TAG(x) x##_bgr888_to_rgba8888
./src/mesa/main/texutil.c:      tab = name##_tab_bgr888_to_rgba8888;    \



can anyone help in locating this function please so I can atleast try to find out if this function is slow per call or just called alot (as oprofile doesn't give you that information)

Each time texutil_tmp.h is included by texutil.c, eight new functions are generated, four for texsubimage2d and four for texsubimage3d. Those functions are listed in the arrays seen at lines 488 and 500 of texutil_tmp.h


The four functions are chosen from depending on whether special pixel unpacking is needed and whether the destination image has a row stride != row size.

Mesa makes extensive use of macros and code templates to generate code. It can be hard to follow sometimes. I didn't write the code in question and it would take me a while to fully understand it too.

-Brian



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to