<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - vdpau-GL interop fails due to different screen objects"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=73200">73200</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>nouveau@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>vdpau-GL interop fails due to different screen objects
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ystreet00@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/nouveau
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Basically I'm trying out the GL_NV_vdpau_interop extension and it's failing
with GL_INVALID_OPERATION inside mesa/state_tracker/st_vdpau.c:121
st_vdpau_map_surface() because the GL screen and the vdpau screen are
different.

Things I've tried:
 - Straight vdpau/x11 (no GL) - works nicely
 - #if 0 the screen equal check - Fails with 'Kernel rejected pushbuf'.  From
this I made the assumption that the screen represents some gpu context and thus
the object space that is addressable.  Also what I gathered from the libdrm
code.
 - Copying the fd hash table from the radeon_drm_winsys_create() into
nouveau_drm_screen_create().  That fails to work because vl_screen_create() and
dri2CreateScreen() both create seperate drm fds resulting in different entries
in the hash table (that's not the same - see next point)
 - static screen singleton (ignoring subsequent drm fds) however
nouveau_drm_screen_create is duplicated in both
/usr/lib/vdpau/libvdpau_nouveau.so and /usr/lib/xorg/modules/dri/nouveau_dri.so
and thus have different locations.

So all of my attempts to get the screens the same have so far failed and I am
not all that familiar with mesa internals to suggest a solution :)

Versions:
$ uname -a
Linux matt-arch 3.12.6-1-ARCH #1 SMP PREEMPT Fri Dec 20 19:39:00 CET 2013
x86_64 GNU/Linux
$ pacman -Si mesa | grep Version
Version        : 10.0.1-1
$ pacman -Si libdrm | grep Version
Version        : 2.4.50-1

Some logs follow.</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>