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>
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;