[RFC] GLX dispatch rewrite

Jeremy Huddleston Sequoia jeremyhu at freedesktop.org
Fri Nov 29 15:30:09 PST 2013


On Nov 29, 2013, at 15:20, Jeremy Huddleston Sequoia <jeremyhu at freedesktop.org> wrote:

> 
> On Nov 29, 2013, at 12:13, Keith Packard <keithp at keithp.com> wrote:
> 
>> Jeremy Huddleston Sequoia <jeremyhu at freedesktop.org> writes:
>> 
>>> So what's the story on this?  How should we solve this for xquartz and
>>> xwin?  Should we pull the old code into hw/xquartz/GL and hw/xwin/GL?
>>> That seems redundant.  So should we restore it in some other way?  I'd
>>> really like to get master working for OS X (at-least XQuartz, but
>>> hopefully Xorg as well).
>> 
>> I'd love to understand this issue a bit better, and am willing to hold
>> the non-critical bug window open another few days to see if we can't
>> come up with a solution before we abandon GLX support on non-DRI
>> platforms.
>> 
>> As I understand things, Adam's plan was to eliminate going through the
>> DRI driver's dispatch table and instead bind directly to libGL
>> itself. As such, that doesn't seem to directly bear on systems that
>> don't go through the DRI loader interface.
>> 
>> I'm sure someone can explain the reason these systems are unable to link
>> to libGL and use the symbols directly, so I'd like to know what we need
>> to put back into the X server to make them work.
> 
> The problem is not with the elimitaion of the DRI loader interface but with the elimination of glapi dispatch that happened at the same time.
> 
> We can't guarantee what symbols (ie OpenGL extensions) will be available in libGL at link time and runtime which is why I wrote _glapi_create_table_from_handle.  This fills out the dispatch table with entry points into our libGL (or no-op entries if unavailable).

Specifically, we have these linking issues due to capabilities not in our libGL at build time.

If you really want to link against libGL directly (which is not something I'm opposed to), then we'll need to update extension use like this to query glGetProcAddress() and have a dispatch table just for extensions rather than all of GL.

Undefined symbols for architecture x86_64:
  "_glGetProgramStringNV", referenced from:
      ___glXDisp_GetProgramStringNV in libglx.a(indirect_program.o)
      ___glXDispSwap_GetProgramStringNV in libglx.a(indirect_program.o)
  "_glGetProgramivNV", referenced from:
      ___glXDisp_GetProgramStringNV in libglx.a(indirect_program.o)
      ___glXDispSwap_GetProgramStringNV in libglx.a(indirect_program.o)
  "_glVertexAttrib1dvNV", referenced from:
      ___glXDispSwap_VertexAttrib1dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib1dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib1fvNV", referenced from:
      ___glXDispSwap_VertexAttrib1fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib1fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib1svNV", referenced from:
      ___glXDispSwap_VertexAttrib1svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib1svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib2dvNV", referenced from:
      ___glXDispSwap_VertexAttrib2dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib2dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib2fvNV", referenced from:
      ___glXDispSwap_VertexAttrib2fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib2fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib2svNV", referenced from:
      ___glXDispSwap_VertexAttrib2svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib2svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib3dvNV", referenced from:
      ___glXDispSwap_VertexAttrib3dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib3dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib3fvNV", referenced from:
      ___glXDispSwap_VertexAttrib3fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib3fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib3svNV", referenced from:
      ___glXDispSwap_VertexAttrib3svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib3svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib4dvNV", referenced from:
      ___glXDispSwap_VertexAttrib4dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib4dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib4fvNV", referenced from:
      ___glXDispSwap_VertexAttrib4fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib4fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib4svNV", referenced from:
      ___glXDispSwap_VertexAttrib4svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib4svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttrib4ubvNV", referenced from:
      ___glXDispSwap_VertexAttrib4ubvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttrib4ubvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs1dvNV", referenced from:
      ___glXDispSwap_VertexAttribs1dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs1dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs1fvNV", referenced from:
      ___glXDispSwap_VertexAttribs1fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs1fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs1svNV", referenced from:
      ___glXDispSwap_VertexAttribs1svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs1svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs2dvNV", referenced from:
      ___glXDispSwap_VertexAttribs2dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs2dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs2fvNV", referenced from:
      ___glXDispSwap_VertexAttribs2fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs2fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs2svNV", referenced from:
      ___glXDispSwap_VertexAttribs2svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs2svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs3dvNV", referenced from:
      ___glXDispSwap_VertexAttribs3dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs3dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs3fvNV", referenced from:
      ___glXDispSwap_VertexAttribs3fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs3fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs3svNV", referenced from:
      ___glXDispSwap_VertexAttribs3svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs3svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs4dvNV", referenced from:
      ___glXDispSwap_VertexAttribs4dvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs4dvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs4fvNV", referenced from:
      ___glXDispSwap_VertexAttribs4fvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs4fvNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs4svNV", referenced from:
      ___glXDispSwap_VertexAttribs4svNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs4svNV in libglx.a(indirect_dispatch.o)
  "_glVertexAttribs4ubvNV", referenced from:
      ___glXDispSwap_VertexAttribs4ubvNV in libglx.a(indirect_dispatch_swap.o)
      ___glXDisp_VertexAttribs4ubvNV in libglx.a(indirect_dispatch.o)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4154 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131129/5e1aa7b6/attachment-0001.bin>


More information about the xorg-devel mailing list