summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2018-09-07 09:26:08 -0400
committerLeo Liu <[email protected]>2018-09-13 14:28:32 -0400
commitcb63e5d1eb0a73c2014a9dc798bfc7549f23279a (patch)
tree76baed19329006df4f8f4c6a340fef6ebffd628c /src
parent4d8ec12f0384e6f6c838ebfc82c41ac39ffb7b22 (diff)
st/vdpau: Use output buffer as back buffer with 24-bit color only
Using output buffer with 8 bits video RGB as back buffer certainly is not working for 30 bits color depth visual. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 6ef7a404474..878a3546727 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -80,7 +80,8 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
* if the VDPAU RGB component order doesn't match the X11 one so
* we only allow the X11 format
*/
- vlsurface->send_to_X = rgba_format == VDP_RGBA_FORMAT_B8G8R8A8;
+ vlsurface->send_to_X = dev->vscreen->color_depth == 24 &&
+ rgba_format == VDP_RGBA_FORMAT_B8G8R8A8;
res_tmpl.target = PIPE_TEXTURE_2D;
res_tmpl.format = VdpFormatRGBAToPipe(rgba_format);