OSDN Git Service

st/vdpau: only send buffers with B8G8R8A8 format to X
authorNayan Deshmukh <nayan26deshmukh@gmail.com>
Thu, 19 Jan 2017 09:29:28 +0000 (14:59 +0530)
committerChristian König <christian.koenig@amd.com>
Thu, 19 Jan 2017 14:34:02 +0000 (15:34 +0100)
commit31908d6a4a3309f4cd4b953d6eecdf41595b1299
treeab10cdb0153ca3dacde051b5dc1da1cc9a69f140
parent3cd092c41508dde2e6259f09df1736911a828548
st/vdpau: only send buffers with B8G8R8A8 format to X

PresentPixmap only works if the pixmap depth matches with the
window depth, otherwise it returns a BadMatch protocol error.
Even if the depths match, the result won't look correctly
if the VDPAU RGB component order doesn't match the X11 one so
we only allow the X11 format.
For other buffers we copy them to a buffer which is send to X.

v2: only send buffers with format VDP_RGBA_FORMAT_B8G8R8A8
v3: reword commit message
v4: add comment explaining the code

Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/output.c
src/gallium/state_trackers/vdpau/presentation.c
src/gallium/state_trackers/vdpau/vdpau_private.h