summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv40
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c2
-rw-r--r--src/gallium/drivers/nv40/nv40_video_context.c15
-rw-r--r--src/gallium/drivers/nv40/nv40_video_context.h9
3 files changed, 15 insertions, 11 deletions
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index b216c5e38c9..779b7cdcb6f 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -1,6 +1,7 @@
#include "pipe/p_screen.h"
#include "nv40_context.h"
+#include "nv40_video_context.h"
#include "nv40_screen.h"
#define NV4X_GRCLASS4097_CHIPSETS 0x00000baf
@@ -199,6 +200,7 @@ nv40_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
pscreen->get_paramf = nv40_screen_get_paramf;
pscreen->is_format_supported = nv40_screen_surface_format_supported;
pscreen->context_create = nv40_create;
+ pscreen->video_context_create = nv40_video_create;
nv40_screen_init_miptree_functions(pscreen);
nv40_screen_init_transfer_functions(pscreen);
diff --git a/src/gallium/drivers/nv40/nv40_video_context.c b/src/gallium/drivers/nv40/nv40_video_context.c
index e2985e5a9c8..15a26ea3b3b 100644
--- a/src/gallium/drivers/nv40/nv40_video_context.c
+++ b/src/gallium/drivers/nv40/nv40_video_context.c
@@ -28,14 +28,19 @@
#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,
diff --git a/src/gallium/drivers/nv40/nv40_video_context.h b/src/gallium/drivers/nv40/nv40_video_context.h
index 206a342e35e..64196caca72 100644
--- a/src/gallium/drivers/nv40/nv40_video_context.h
+++ b/src/gallium/drivers/nv40/nv40_video_context.h
@@ -30,12 +30,9 @@
#include <pipe/p_video_context.h>
-struct pipe_context;
-
-struct pipe_video_context*
-nv40_video_create(struct pipe_context *pipe, enum pipe_video_profile profile,
+struct pipe_video_context *
+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);
#endif