vl: Use pipe_screen::video_context_create hook instead of SP ctor.
authorYounes Manton <younes.m@gmail.com>
Mon, 24 May 2010 04:14:45 +0000 (00:14 -0400)
committerYounes Manton <younes.m@gmail.com>
Mon, 24 May 2010 04:14:45 +0000 (00:14 -0400)
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/winsys/g3dvl/xlib/xsp_winsys.c

index 11aa0c4583ba799add22b1dd63e83fee2c5aa5a0..00700974c78da1cd0f79b0f934e28411f3a8cccb 100644 (file)
@@ -37,6 +37,7 @@
 #include "sp_texture.h"
 #include "sp_screen.h"
 #include "sp_context.h"
+#include "sp_video_context.h"
 #include "sp_fence.h"
 #include "sp_public.h"
 
@@ -274,6 +275,7 @@ softpipe_create_screen(struct sw_winsys *winsys)
    screen->base.is_format_supported = softpipe_is_format_supported;
    screen->base.context_create = softpipe_create_context;
    screen->base.flush_frontbuffer = softpipe_flush_frontbuffer;
+   screen->base.video_context_create = sp_video_create;
 
    util_format_s3tc_init();
 
index e5d4664d4e84a64c738a3b5926590e76d6754ad7..95c2af1e73c568394f066fbfd1376e93bdb495f6 100644 (file)
@@ -116,8 +116,12 @@ vl_video_create(struct vl_screen *vscreen,
 
    assert(vscreen);
    assert(width && height);
+   assert(vscreen->pscreen->video_context_create);
 
-   vpipe = sp_video_create(vscreen->pscreen, profile, chroma_format, width, height);
+   vpipe = vscreen->pscreen->video_context_create(vscreen->pscreen,
+                                                  profile,
+                                                  chroma_format,
+                                                  width, height, NULL);
    if (!vpipe)
       return NULL;