Bug 80561 - Incorrect implementation of some VDPAU APIs.
Summary: Incorrect implementation of some VDPAU APIs.
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: 10.2
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-26 15:14 UTC by Jean-Yves Avenard
Modified: 2014-08-26 15:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Possible fix (7.48 KB, patch)
2014-08-13 18:23 UTC, Christian König
Details | Splinter Review

Description Jean-Yves Avenard 2014-06-26 15:14:28 UTC
The issue appears to be in at least two functions

For both VdpOutputSurfaceRenderOutputSurface and VdpOutputSurfaceRenderBitmapSurface

According to NVIDIA's documentation:
ftp://download.nvidia.com/XFree86/vdpau/doxygen/html/group___vdp_output_surface_render.html#gaf69e77f4d465d059341477a74ccebcd5

"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
Comment 1 Christian König 2014-08-13 18:23:46 UTC
Created attachment 104577 [details] [review]
Possible fix

The attached patch should fix the issue, please test.
Comment 2 Christian König 2014-08-26 15:57:51 UTC
I've just pushed the fix upstream.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.