st/xvmc: add DRI3 support
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 25 Nov 2016 17:43:00 +0000 (17:43 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 19 May 2017 18:46:54 +0000 (19:46 +0100)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/state_trackers/xvmc/context.c

index e9014c8bf53ff700a2827bb82909d60f0d4fef73..c239b3ddd6bfbaad626832e22b765e71a84e2fb9 100644 (file)
@@ -229,7 +229,9 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
       return BadAlloc;
 
    /* TODO: Reuse screen if process creates another context */
-   vscreen = vl_dri2_screen_create(dpy, scrn);
+   vscreen = vl_dri3_screen_create(dpy, scrn);
+   if (!vscreen)
+      vscreen = vl_dri2_screen_create(dpy, scrn);
 
    if (!vscreen) {
       XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL screen.\n");