In a preparation of having proper multi-platform/backend handling in VL.
With follow up commits we'll introduce a dispatch within vl_screen
similar to the one in pipe_screen. This way any VL state-tracker can
operate seamlessly, considering the backend/platform is properly setup.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
struct pipe_loader_device *dev;
};
-struct vl_screen*
-vl_screen_create(Display *display, int screen);
-
void vl_screen_destroy(struct vl_screen *vscreen);
struct pipe_resource*
vl_screen_get_private(struct vl_screen *vscreen);
struct vl_screen*
+vl_dri2_screen_create(Display *display, int screen);
+
+struct vl_screen *
vl_drm_screen_create(int fd);
void
}
struct vl_screen*
-vl_screen_create(Display *display, int screen)
+vl_dri2_screen_create(Display *display, int screen)
{
struct vl_dri_screen *scrn;
const xcb_query_extension_reply_t *extension;
if (!omx_display)
goto error;
- omx_screen = vl_screen_create(omx_display, 0);
+ omx_screen = vl_dri2_screen_create(omx_display, 0);
if (!omx_screen) {
XCloseDisplay(omx_display);
goto error;
return VA_STATUS_ERROR_UNIMPLEMENTED;
case VA_DISPLAY_GLX:
case VA_DISPLAY_X11:
- drv->vscreen = vl_screen_create(ctx->native_dpy, ctx->x11_screen);
+ drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen);
if (!drv->vscreen)
goto error_screen;
break;
pipe_reference_init(&dev->reference, 1);
- dev->vscreen = vl_screen_create(display, screen);
+ dev->vscreen = vl_dri2_screen_create(display, screen);
if (!dev->vscreen) {
ret = VDP_STATUS_RESOURCES;
goto no_vscreen;
return BadAlloc;
/* TODO: Reuse screen if process creates another context */
- vscreen = vl_screen_create(dpy, scrn);
+ vscreen = vl_dri2_screen_create(dpy, scrn);
if (!vscreen) {
XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL screen.\n");