st/vdpau: Use output buffer as back buffer with 24-bit color only
authorLeo Liu <leo.liu@amd.com>
Fri, 7 Sep 2018 13:26:08 +0000 (09:26 -0400)
committerLeo Liu <leo.liu@amd.com>
Thu, 13 Sep 2018 18:28:32 +0000 (14:28 -0400)
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 <leo.liu@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/state_trackers/vdpau/output.c

index 6ef7a4044740a69639ad8cc1544778960d6a6881..878a35467270af4b95e7b0a26fdea1d8c9c3c61b 100644 (file)
@@ -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);