summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xorg
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-08 19:22:43 +0200
committerChristian König <[email protected]>2011-07-08 19:22:43 +0200
commitea78480029450c019287c2a94d7c42a6a1d12dc3 (patch)
tree84882aedbe4991a4665c80f991b3fa3116360ae4 /src/gallium/state_trackers/xorg
parent4e837f557bf5f5afb286e1f2244ed69c0092c2d6 (diff)
[g3dvl] and finally remove pipe_video_context
Diffstat (limited to 'src/gallium/state_trackers/xorg')
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/context.c17
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/subpicture.c14
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c25
3 files changed, 24 insertions, 32 deletions
diff --git a/src/gallium/state_trackers/xorg/xvmc/context.c b/src/gallium/state_trackers/xorg/xvmc/context.c
index 7b74825b37e..f21ebda76d3 100644
--- a/src/gallium/state_trackers/xorg/xvmc/context.c
+++ b/src/gallium/state_trackers/xorg/xvmc/context.c
@@ -31,7 +31,7 @@
#include <X11/extensions/XvMClib.h>
#include <pipe/p_screen.h>
-#include <pipe/p_video_context.h>
+#include <pipe/p_video_decoder.h>
#include <pipe/p_video_state.h>
#include <pipe/p_state.h>
@@ -244,13 +244,14 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
return BadAlloc;
}
- context_priv->decoder = vctx->vpipe->create_decoder(vctx->vpipe,
- ProfileToPipe(mc_type),
- (mc_type & XVMC_IDCT) ?
- PIPE_VIDEO_ENTRYPOINT_IDCT :
- PIPE_VIDEO_ENTRYPOINT_MC,
- FormatToPipe(chroma_format),
- width, height);
+ context_priv->decoder = vctx->pipe->create_video_decoder
+ (
+ vctx->pipe,
+ ProfileToPipe(mc_type),
+ (mc_type & XVMC_IDCT) ? PIPE_VIDEO_ENTRYPOINT_IDCT : PIPE_VIDEO_ENTRYPOINT_MC,
+ FormatToPipe(chroma_format),
+ width, height
+ );
if (!context_priv->decoder) {
XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL decoder.\n");
diff --git a/src/gallium/state_trackers/xorg/xvmc/subpicture.c b/src/gallium/state_trackers/xorg/xvmc/subpicture.c
index 4ecb0e1f887..7d6ff061eb7 100644
--- a/src/gallium/state_trackers/xorg/xvmc/subpicture.c
+++ b/src/gallium/state_trackers/xorg/xvmc/subpicture.c
@@ -32,7 +32,7 @@
#include <xorg/fourcc.h>
#include <pipe/p_screen.h>
-#include <pipe/p_video_context.h>
+#include <pipe/p_video_decoder.h>
#include <pipe/p_state.h>
#include <util/u_memory.h>
@@ -224,7 +224,6 @@ Status XvMCCreateSubpicture(Display *dpy, XvMCContext *context, XvMCSubpicture *
XvMCContextPrivate *context_priv;
XvMCSubpicturePrivate *subpicture_priv;
struct pipe_context *pipe;
- struct pipe_video_context *vpipe;
struct pipe_resource tex_templ, *tex;
struct pipe_sampler_view sampler_templ;
Status ret;
@@ -238,7 +237,6 @@ Status XvMCCreateSubpicture(Display *dpy, XvMCContext *context, XvMCSubpicture *
context_priv = context->privData;
pipe = context_priv->vctx->pipe;
- vpipe = context_priv->vctx->vpipe;
if (!subpicture)
return XvMCBadSubpicture;
@@ -259,9 +257,9 @@ Status XvMCCreateSubpicture(Display *dpy, XvMCContext *context, XvMCSubpicture *
tex_templ.target = PIPE_TEXTURE_2D;
tex_templ.format = XvIDToPipe(xvimage_id);
tex_templ.last_level = 0;
- if (vpipe->screen->get_video_param(vpipe->screen,
- PIPE_VIDEO_PROFILE_UNKNOWN,
- PIPE_VIDEO_CAP_NPOT_TEXTURES)) {
+ if (pipe->screen->get_video_param(pipe->screen,
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_CAP_NPOT_TEXTURES)) {
tex_templ.width0 = width;
tex_templ.height0 = height;
}
@@ -275,7 +273,7 @@ Status XvMCCreateSubpicture(Display *dpy, XvMCContext *context, XvMCSubpicture *
tex_templ.bind = PIPE_BIND_SAMPLER_VIEW;
tex_templ.flags = 0;
- tex = vpipe->screen->resource_create(vpipe->screen, &tex_templ);
+ tex = pipe->screen->resource_create(pipe->screen, &tex_templ);
memset(&sampler_templ, 0, sizeof(sampler_templ));
u_sampler_view_default_template(&sampler_templ, tex, tex->format);
@@ -305,7 +303,7 @@ Status XvMCCreateSubpicture(Display *dpy, XvMCContext *context, XvMCSubpicture *
tex_templ.height0 = 1;
tex_templ.usage = PIPE_USAGE_STATIC;
- tex = vpipe->screen->resource_create(vpipe->screen, &tex_templ);
+ tex = pipe->screen->resource_create(pipe->screen, &tex_templ);
memset(&sampler_templ, 0, sizeof(sampler_templ));
u_sampler_view_default_template(&sampler_templ, tex, tex->format);
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index 0370a6e858f..e8ca8152e7a 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -30,7 +30,7 @@
#include <X11/Xlibint.h>
-#include <pipe/p_video_context.h>
+#include <pipe/p_video_decoder.h>
#include <pipe/p_video_state.h>
#include <pipe/p_state.h>
@@ -304,7 +304,6 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
XvMCContextPrivate *context_priv;
struct pipe_context *pipe;
- struct pipe_video_context *vpipe;
XvMCSurfacePrivate *surface_priv;
XVMC_MSG(XVMC_TRACE, "[XvMC] Creating surface %p.\n", surface);
@@ -318,7 +317,6 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
context_priv = context->privData;
pipe = context_priv->vctx->pipe;
- vpipe = context_priv->vctx->vpipe;
surface_priv = CALLOC(1, sizeof(XvMCSurfacePrivate));
if (!surface_priv)
@@ -357,10 +355,8 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur
XvMCMacroBlockArray *macroblocks, XvMCBlockArray *blocks
)
{
- struct pipe_video_context *vpipe;
struct pipe_video_decode_buffer *t_buffer;
- XvMCContextPrivate *context_priv;
XvMCSurfacePrivate *target_surface_priv;
XvMCSurfacePrivate *past_surface_priv;
XvMCSurfacePrivate *future_surface_priv;
@@ -406,9 +402,6 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur
assert(!past_surface || past_surface_priv->context == context);
assert(!future_surface || future_surface_priv->context == context);
- context_priv = context->privData;
- vpipe = context_priv->vctx->vpipe;
-
t_buffer = target_surface_priv->decode_buffer;
// enshure that all reference frames are flushed
@@ -496,7 +489,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
{
static int dump_window = -1;
- struct pipe_video_context *vpipe;
+ struct pipe_context *pipe;
struct vl_compositor *compositor;
XvMCSurfacePrivate *surface_priv;
@@ -522,7 +515,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
assert(srcy + srch - 1 < surface->height);
subpicture_priv = surface_priv->subpicture ? surface_priv->subpicture->privData : NULL;
- vpipe = context_priv->vctx->vpipe;
+ pipe = context_priv->vctx->pipe;
compositor = &context_priv->compositor;
if (!context_priv->drawable_surface ||
@@ -571,15 +564,15 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
}
// Workaround for r600g, there seems to be a bug in the fence refcounting code
- vpipe->screen->fence_reference(vpipe->screen, &surface_priv->fence, NULL);
+ pipe->screen->fence_reference(pipe->screen, &surface_priv->fence, NULL);
vl_compositor_render(compositor, PictureToPipe(flags), context_priv->drawable_surface, &dst_rect, &surface_priv->fence);
XVMC_MSG(XVMC_TRACE, "[XvMC] Submitted surface %p for display. Pushing to front buffer.\n", surface);
- vpipe->screen->flush_frontbuffer
+ pipe->screen->flush_frontbuffer
(
- vpipe->screen,
+ pipe->screen,
context_priv->drawable_surface->texture,
0, 0,
vl_contextprivate_get(context_priv->vctx, context_priv->drawable_surface)
@@ -606,7 +599,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
PUBLIC
Status XvMCGetSurfaceStatus(Display *dpy, XvMCSurface *surface, int *status)
{
- struct pipe_video_context *vpipe;
+ struct pipe_context *pipe;
XvMCSurfacePrivate *surface_priv;
XvMCContextPrivate *context_priv;
@@ -619,12 +612,12 @@ Status XvMCGetSurfaceStatus(Display *dpy, XvMCSurface *surface, int *status)
surface_priv = surface->privData;
context_priv = surface_priv->context->privData;
- vpipe = context_priv->vctx->vpipe;
+ pipe = context_priv->vctx->pipe;
*status = 0;
if (surface_priv->fence)
- if (!vpipe->screen->fence_signalled(vpipe->screen, surface_priv->fence))
+ if (!pipe->screen->fence_signalled(pipe->screen, surface_priv->fence))
*status |= XVMC_RENDERING;
return Success;