Mesa (master): auxiliary/vl: rename vl_screen_create to vl_dri2_screen_create

Emil Velikov evelikov at kemper.freedesktop.org
Fri Nov 20 10:55:29 UTC 2015


Module: Mesa
Branch: master
Commit: 2bd9116b8249fdb1711335711f8daef5f68752a6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2bd9116b8249fdb1711335711f8daef5f68752a6

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Mon Nov  9 11:17:07 2015 +0000

auxiliary/vl: rename vl_screen_create to vl_dri2_screen_create

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 at gmail.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>

---

 src/gallium/auxiliary/vl/vl_winsys.h        |    6 +++---
 src/gallium/auxiliary/vl/vl_winsys_dri.c    |    2 +-
 src/gallium/state_trackers/omx/entrypoint.c |    2 +-
 src/gallium/state_trackers/va/context.c     |    2 +-
 src/gallium/state_trackers/vdpau/device.c   |    2 +-
 src/gallium/state_trackers/xvmc/context.c   |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_winsys.h b/src/gallium/auxiliary/vl/vl_winsys.h
index df01917..9aa65ad 100644
--- a/src/gallium/auxiliary/vl/vl_winsys.h
+++ b/src/gallium/auxiliary/vl/vl_winsys.h
@@ -46,9 +46,6 @@ struct vl_screen
    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*
@@ -67,6 +64,9 @@ void*
 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
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri.c b/src/gallium/auxiliary/vl/vl_winsys_dri.c
index 3b1b87f..46f5816 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri.c
@@ -306,7 +306,7 @@ get_xcb_screen(xcb_screen_iterator_t iter, int screen)
 }
 
 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;
diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
index 4716333..dd72b29 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -97,7 +97,7 @@ struct vl_screen *omx_get_screen(void)
          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;
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 04ca2f2..0709dfb 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -118,7 +118,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
       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;
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index 31c9505..8fda388 100644
--- a/src/gallium/state_trackers/vdpau/device.c
+++ b/src/gallium/state_trackers/vdpau/device.c
@@ -63,7 +63,7 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
 
    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;
diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c
index 4702b44..07b33e4 100644
--- a/src/gallium/state_trackers/xvmc/context.c
+++ b/src/gallium/state_trackers/xvmc/context.c
@@ -229,7 +229,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
       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");




More information about the mesa-commit mailing list