[Wayland-bugs] [Bug 77521] New: cannot create opengl by dynamically loading wayland symbols from library

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 16 04:25:26 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=77521

          Priority: medium
            Bug ID: 77521
          Assignee: wayland-bugs at lists.freedesktop.org
           Summary: cannot create opengl by dynamically loading wayland
                    symbols from library
          Severity: blocker
    Classification: Unclassified
                OS: All
          Reporter: pulkitnandan at gmail.com
          Hardware: All
            Status: NEW
           Version: 1.3.0
         Component: wayland
           Product: Wayland

I was trying to implement a window system agnostic library which will be used
in creating opengl apps with different windows systems. Lets name that library
as WSAL.Now to achieve this WSAL implements window system interfaces which is
used in creating native windows etc of specific window system while egl calls
are in main WSAL library.Consider wayland and X as examples of such two
libraries. As I separate several implementations of wayland and and X from
different team members.So to test them efficiently I have to create several
function pointers and object pointers that are present in those library
implementations and load them with symbols from libraries using dlsym utility
so that at compile time I donot have to link with any library.

For X I was successfully in creating X backend.
For wayland I first got stuck at functions which are inline in
wayland_client_protocol.h. For them I cannot do the same.Instead I created a
function pointer which these functions actually calls in inline definition.

Like when wl_display_get_registry is called wl_proxy_marshal_constructor is
ultimately called.

The terrible fucntions are wl_proxy_marshal_constructor and wl_proxy_marshal as
they are defined with variable arguments.So I declared
new_wl_proxy_marshal_constructor a function pointer of same type as
wl_proxy_marshal_constructor and loaded the symbol from library using dlsym
into new_wl_proxy_marshal_constructor.

But faced a fundamental problem of determing argument types as these terrible
functions (TFs) don't have constant argument signature i.e it may sometime pass
a int as its 4th aguments in one inline expansion while a char * in some other
inline function.

So I explored this wl_proxy_marshal_constructor which actually calls
wl_proxy_marshal_array_constructor after forming a variable arguments to a
single argument using some wl_proxy object signature which I have no access to
in main wayland interface.

dlsym option of using rtld_now doesnot work.

How to implement such functionality in wayland or provide a way to create a app
with no linking at build time.

Thanks
Rohit Nandan

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20140416/6015dcb5/attachment.html>


More information about the Wayland-bugs mailing list