g3dvl: pass display and screen to g3dvl when creating video private context
authorCooper Yuan <cooperyuan@gmail.com>
Fri, 23 Oct 2009 06:44:27 +0000 (14:44 +0800)
committerCooper Yuan <cooperyuan@gmail.com>
Fri, 23 Oct 2009 06:44:27 +0000 (14:44 +0800)
src/gallium/state_trackers/xorg/xvmc/context.c
src/gallium/winsys/g3dvl/vl_winsys.h
src/gallium/winsys/g3dvl/xlib/xsp_winsys.c

index 942692d1bb95edd370963bb613f159b9f0cc5149..c8a389385a80796e8db10624ffdbd2cd52509a75 100644 (file)
@@ -195,7 +195,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
       return BadAlloc;
    }
 
-   vpipe = vl_video_create(screen, ProfileToPipe(mc_type),
+   vpipe = vl_video_create(dpy, scrn, screen, ProfileToPipe(mc_type),
                            FormatToPipe(chroma_format), width, height);
 
    if (!vpipe) {
index 22119f95595582660061af3127d906e983d301f2..b4fa0d67a1b532c7caf522006310718c0cdcd91e 100644 (file)
@@ -39,7 +39,8 @@ struct pipe_screen*
 vl_screen_create(Display *display, int screen);
 
 struct pipe_video_context*
-vl_video_create(struct pipe_screen *screen,
+vl_video_create(Display *display, int screen,
+                struct pipe_screen *p_screen,
                 enum pipe_video_profile profile,
                 enum pipe_video_chroma_format chroma_format,
                 unsigned width, unsigned height);
index 0e5f5a587b440a51d3dfd062c038891e0719362b..08067aad64c4c3f3cc1964da3db457cc0a62b274 100644 (file)
@@ -300,7 +300,8 @@ vl_screen_create(Display *display, int screen)
 }
 
 struct pipe_video_context*
-vl_video_create(struct pipe_screen *screen,
+vl_video_create(Display *display, int screen,
+                struct pipe_screen *p_screen,
                 enum pipe_video_profile profile,
                 enum pipe_video_chroma_format chroma_format,
                 unsigned width, unsigned height)
@@ -308,10 +309,10 @@ vl_video_create(struct pipe_screen *screen,
    struct pipe_video_context *vpipe;
    struct xsp_context *xsp_context;
 
-   assert(screen);
+   assert(p_screen);
    assert(width && height);
 
-   vpipe = sp_video_create(screen, profile, chroma_format, width, height);
+   vpipe = sp_video_create(p_screen, profile, chroma_format, width, height);
    if (!vpipe)
       return NULL;