vl: Adapt to dri changes.
[mesa.git] / src / gallium / drivers / nv40 / nv40_video_context.c
index e2985e5a9c80f253f0d7a4ab1faf548291dd3cf8..15a26ea3b3b10a01744fbb596bd4df6761f46439 100644 (file)
 #include "nv40_video_context.h"
 #include <softpipe/sp_video_context.h>
 
-
 struct pipe_video_context *
-nv40_video_create(struct pipe_context *pipe, enum pipe_video_profile profile,
+nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
                   enum pipe_video_chroma_format chroma_format,
-                  unsigned width, unsigned height,
-                  unsigned pvctx_id)
+                  unsigned width, unsigned height, void *priv)
 {
-   assert(pipe);
+   struct pipe_context *pipe;
+
+   assert(screen);
+
+   pipe = screen->context_create(screen, priv);
+   if (!pipe)
+      return NULL;
+
    return sp_video_create_ex(pipe, profile, chroma_format, width, height,
                              VL_MPEG12_MC_RENDERER_BUFFER_PICTURE,
                              VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_ONE,