aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorCooper Yuan <[email protected]>2010-01-29 21:42:09 +0800
committerCooper Yuan <[email protected]>2010-01-29 21:42:09 +0800
commit6783672a974d73b9900f596fc71fb9c17d2c2ecc (patch)
treee06f7cb1e8121257da6b6c5e4390b6d0ab4acf3a /src/gallium/winsys
parent447dddb93d8dc2551ef7a9c43004237c7a8dd2dd (diff)
r300g/g3dvl: port xvmc video stuff to mesa/pipe-video branch
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm.c19
-rw-r--r--src/gallium/winsys/g3dvl/drm/radeon/Makefile19
2 files changed, 38 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
index 52419725337..cbbdcf2651d 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
@@ -130,6 +130,24 @@ struct pipe_context* radeon_create_context(struct drm_api* api,
}
}
+
+static struct pipe_video_context *
+radeon_create_video_context(struct drm_api *api, struct pipe_screen *pscreen,
+ enum pipe_video_profile profile,
+ enum pipe_video_chroma_format chroma_format,
+ unsigned width, unsigned height)
+{
+ struct radeon_winsys *winsys = (struct radeon_winsys*)pscreen->winsys;
+ struct pipe_context *pipe;
+ struct pipe_video_context pvctx;
+
+ pipe = radeon_create_context(api, pscreen);
+ if (!pipe)
+ return NULL;
+
+ pvctx = r300_video_create(pipe, profile, chroma_format, width, height, i);
+}
+
boolean radeon_buffer_from_texture(struct drm_api* api,
struct pipe_texture* texture,
struct pipe_buffer** buffer,
@@ -249,6 +267,7 @@ static boolean radeon_local_handle_from_texture(struct drm_api *api,
struct drm_api drm_api_hooks = {
.create_screen = radeon_create_screen,
.create_context = radeon_create_context,
+ .create_video_context = radeon_create_video_context,
.texture_from_shared_handle = radeon_texture_from_shared_handle,
.shared_handle_from_texture = radeon_shared_handle_from_texture,
.local_handle_from_texture = radeon_local_handle_from_texture,
diff --git a/src/gallium/winsys/g3dvl/drm/radeon/Makefile b/src/gallium/winsys/g3dvl/drm/radeon/Makefile
new file mode 100644
index 00000000000..6768119c2f4
--- /dev/null
+++ b/src/gallium/winsys/g3dvl/drm/radeon/Makefile
@@ -0,0 +1,19 @@
+# This makefile produces a libXvMCg3dvl.so which is
+# based on DRM/DRI
+
+TOP = ../../../../../..
+include $(TOP)/configs/current
+
+C_SOURCES =
+
+DRIVER_INCLUDES = $(shell pkg-config libdrm libdrm_radeon --cflags-only-I) \
+ -I$(TOP)/src/gallium/winsys/drm/nouveau \
+DRIVER_DEFINES = $(shell pkg-config libdrm libdrm_nouveau --cflags-only-other)
+
+PIPE_DRIVERS = \
+ $(TOP)/src/gallium/winsys/drm/radeon/drm/libradeondrm.a \
+ $(TOP)/src/gallium/drivers/radeon/libradeon.a \
+
+DRIVER_LIB_DEPS += $(shell pkg-config libdrm_radeon --libs)
+
+include ../Makefile.template