[Mesa-dev] [PATCH 11/14] st/va: add dri3 support

Leo Liu leo.liu at amd.com
Wed May 11 15:06:33 UTC 2016


Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 src/gallium/state_trackers/va/context.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 25d587a..93ab3d9 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -119,7 +119,11 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
       return VA_STATUS_ERROR_UNIMPLEMENTED;
    case VA_DISPLAY_GLX:
    case VA_DISPLAY_X11:
-      drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen);
+#if defined(HAVE_DRI3)
+      drv->vscreen = vl_dri3_screen_create(ctx->native_dpy, ctx->x11_screen);
+#endif
+      if (!drv->vscreen)
+         drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen);
       if (!drv->vscreen)
          goto error_screen;
       break;
-- 
2.7.4



More information about the mesa-dev mailing list