> Yes, but that is the problem of the linker. It is the same problem
> whether you write in assembler or C and regardless if you make
> the call directly or indirectly through function pointer.
> 
> OK, in assembler you need to have special PIC code, as I'm my
> attempt to an implementation in the most recent mail.

Yes, what I meant is that I did not know at all how to add the PIC
code so that the linker would do its job. In the elf.c code, the
linker already did its job, so you already got the address of the
function.

> Try the patch in my most recent mail.

I applied it and Wine cannot seem to load libopengl32.so anymore. I
will try to investigate a bit more. Will send a mail as soon as I find
out why it fails.

> My patch (the latest one) is designed for a worst case scenario where
> 1. There might be calls from multiple thread
> 2. There might be a reentrancy in the same thread.
> 
> I'm not sure 2 is even possible for OpenGL functions.
> Are there OpenGL functions that takes callbacks?
> And if so are these callbacks are allowed to call
> OpenGL functions. If not the thunking might be done
> faster.

Nope, they are not callbacks as far as I know in OpenGL, at least none
that I know of (maybe some extension do, but that would seem a bit far
fetched for a 'low level' API).

Anyway, if you could provide me the same patch but without 1. and
2. and without the calls to the X11 crit. sect., I would be very happy
to do some benchmark with them :-))

-- 
               Lionel Ulmer   -   [EMAIL PROTECTED]
    My Advogato Wine diary : http://www.advogato.org/person/bbrox/

Reply via email to