st/vdpau: add dri3 support
authorLeo Liu <leo.liu@amd.com>
Tue, 26 Apr 2016 15:23:53 +0000 (11:23 -0400)
committerLeo Liu <leo.liu@amd.com>
Mon, 16 May 2016 20:28:51 +0000 (16:28 -0400)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/device.c

index de7e951a46a8a94808b4b554a5a42bd11b1562fb..81b75827f34efa40d0485b2eda826120ed139e8e 100644 (file)
@@ -63,7 +63,11 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
 
    pipe_reference_init(&dev->reference, 1);
 
-   dev->vscreen = vl_dri2_screen_create(display, screen);
+#if defined(HAVE_DRI3)
+   dev->vscreen = vl_dri3_screen_create(display, screen);
+#endif
+   if (!dev->vscreen)
+      dev->vscreen = vl_dri2_screen_create(display, screen);
    if (!dev->vscreen) {
       ret = VDP_STATUS_RESOURCES;
       goto no_vscreen;