<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 --- - Incorrect implementation of some VDPAU APIs."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=80561">80561</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect implementation of some VDPAU APIs.
          </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>jyavenard@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.2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Mesa core
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The issue appears to be in at least two functions

For both VdpOutputSurfaceRenderOutputSurface and
VdpOutputSurfaceRenderBitmapSurface

According to NVIDIA's documentation:
<a href="ftp://download.nvidia.com/XFree86/vdpau/doxygen/html/group___vdp_output_surface_render.html#gaf69e77f4d465d059341477a74ccebcd5">ftp://download.nvidia.com/XFree86/vdpau/doxygen/html/group___vdp_output_surface_render.html#gaf69e77f4d465d059341477a74ccebcd5</a>

"source_surface     The source surface for the compositing operation. The
surface is treated as having four components: red, green, blue and alpha. Any
missing components are treated as 1.0. For example, for an A8 VdpBitmapSurface,
alpha will come from the surface but red, green and blue will be treated as
1.0. If source_surface is NULL, all components will be treated as 1.0. Note
that destination_surface and source_surface must have been allocated via the
same VdpDevice."

The key point being: "If source_surface is NULL, all components will be treated
as 1.0"

However, mesa's vdpau immediately returns an error if the VdpBitmapSurface is
invalid.

NULL provided as a parameter, be it a video surface or a bitmap surface usually
have a specific meaning, and doesn't always signify an error</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>