<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - kodi segfault since auxiliary/vl: rework the build of the VL code"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86837#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - kodi segfault since auxiliary/vl: rework the build of the VL code"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86837">bug 86837</a>
              from <span class="vcard"><a class="email" href="mailto:emil.l.velikov@gmail.com" title="Emil Velikov <emil.l.velikov@gmail.com>"> <span class="fn">Emil Velikov</span></a>
</span></b>
        <pre>(In reply to Christian König from <a href="show_bug.cgi?id=86837#c3">comment #3</a>)
<span class="quote">> Most likely we end up with the implementation with the dummy symbols loaded
> first (e.g. kodi loads OGL first the VDPAU). This results in a couple of
> problems when VDPAu tries to query the video capabilities from the screen.

> Would it be possible to define the dummy symbols as weak and pointing to
> zero instead? That might allow overwriting them after loading VDPAU.</span >
>
There are two catches with using weak symbols:

1. Both modules must be opened with RTLD_GLOBAL (presently holds true).
2. The VDPAU must be opened/used prior to GL. Otherwise we end up with one of
two issues:
 A: DRI module doesn't define the functions -> segfault, as we call function @0
 B: DRI module defines stubs -> the stubs end up used, rather than the ones in
VDPAU module.

So based (and the note below) on those I'll revert the previous approach and
shove everything but vl_winsys_dri.c back into the DRI modules :'(

On a closer look it seems that we have a _very_ nasty ABI between the DRI and
VDPAU modules, which lacks any checks and can explode at any moment.

Would be interesting to see if the nvidia driver uses similar approach or
copies the objects back and forth between the two contexts, keeping them in
sync. An interesting TODO for rainy days :)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>