Fast thread-local storage for OpenGL drivers

Gareth Hughes gareth at nvidia.com
Sat Feb 22 13:19:45 CST 2003


Jakub Jelinek wrote:
> 
> What actually matters is the size of PT_TLS segment of the shared library
> which defines those 2-3 __thread variables (I assume it is libGL.so,
> right?).

Generally, yes.

> It would be good if the rest of __thread variables which aren't
> performance critical is provided by some other library (and accessed 
> always through GD or LD model).

I guess it would be possible to have non-critical variables defined in the
driver backend, say.

> Forgot to say, the offsets are obviously constant (until you dlclose the
> library which declares them).
> If they weren't, one couldn't keep pointers to __thread variables around
> in IE/LE models.

The variables could move in the dynamic case, hence the function call to get
their address.  We're trying to avoid that, obviously :-)

-- 
Gareth Hughes (gareth at nvidia.com)
OpenGL Developer, NVIDIA Corporation 



More information about the wine-devel mailing list