On Thu, Apr 1, 2010 at 6:17 PM, Luca Barbieri <l...@luca-barbieri.com> wrote:
> Are you sure about this?
>
> I've tried doing it, and it turns out that basically every Gallium
> module needs this initialized.
>
> For instance:
> st/mesa due to glReadPixels
> vg/mesa due to vgReadPixels
> st/python due to mesa sampling
> several programs in rbug to dump textures to disk
> softpipe due to texture sampling
> nv50 due to static attrbutes
>
> Also, if translate did not needlessly duplicate the generic format
> support, it would also need it, and draw would too.
>
> Basically everything in Gallium will end up having util_format
> initialized, and it seems there are at least 10 different places in
> the code where such a call would need to be added (including strange
> places like rbug with call pipe*tile* which calls util_format_read*).
>
> I added it for nv50 before realizing the extent of the changes needed,
> but now think it is not really a feasible solution.
>
> In other words, I think this should be revisited as it results in
> cluttering the codebase and creating a somewhat unreliable system.
>
> I believe that we should either use the global constructor-like
> technique I introduced, or do the following:
> 1. Pregenerate half float tables
> 2. Initialize the S3TC function pointers to stubs that dlopen the
> library, initialize the function pointers to the real functions and
> then delegate to the real function corresponding to the stub
>
> More specifically, I think this two-step approach is superior to the
> global constructor, but that the global constructor technique may be
> useful in other cases where it is not possible to either pregenerate
> or have a "free initialization check" due to the S3TC dynamic loading.

I still think you might be overthinking this, but whatever. :3

~ C.

-- 
When the facts change, I change my mind. What do you do, sir? ~ Keynes

Corbin Simpson
<mostawesomed...@gmail.com>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to