diff options
author | Christian König <[email protected]> | 2011-07-08 19:22:43 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-08 19:22:43 +0200 |
commit | ea78480029450c019287c2a94d7c42a6a1d12dc3 (patch) | |
tree | 84882aedbe4991a4665c80f991b3fa3116360ae4 /src/gallium/state_trackers | |
parent | 4e837f557bf5f5afb286e1f2244ed69c0092c2d6 (diff) |
[g3dvl] and finally remove pipe_video_context
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/vdpau/decode.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/device.c | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/presentation.c | 7 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/vdpau_private.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xvmc/context.c | 17 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xvmc/subpicture.c | 14 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xvmc/surface.c | 25 |
10 files changed, 34 insertions, 56 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 8458864cfc1..4d01fe6a68e 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -25,8 +25,6 @@ * **************************************************************************/ -#include <pipe/p_video_context.h> - #include <util/u_memory.h> #include <util/u_math.h> #include <util/u_debug.h> @@ -41,7 +39,7 @@ vlVdpDecoderCreate(VdpDevice device, VdpDecoder *decoder) { enum pipe_video_profile p_profile; - struct pipe_video_context *vpipe; + struct pipe_context *pipe; vlVdpDevice *dev; vlVdpDecoder *vldecoder; VdpStatus ret; @@ -63,7 +61,7 @@ vlVdpDecoderCreate(VdpDevice device, if (!dev) return VDP_STATUS_INVALID_HANDLE; - vpipe = dev->context->vpipe; + pipe = dev->context->pipe; vldecoder = CALLOC(1,sizeof(vlVdpDecoder)); if (!vldecoder) @@ -72,9 +70,9 @@ vlVdpDecoderCreate(VdpDevice device, vldecoder->device = dev; // TODO: Define max_references. Used mainly for H264 - vldecoder->decoder = vpipe->create_decoder + vldecoder->decoder = pipe->create_video_decoder ( - vpipe, p_profile, + pipe, p_profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CHROMA_FORMAT_420, width, height diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index 30c6b7aae4b..41248cde705 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -26,7 +26,6 @@ **************************************************************************/ #include <pipe/p_compiler.h> -#include <pipe/p_video_context.h> #include <util/u_memory.h> #include <util/u_debug.h> diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index ea6d50d7457..d5187006bfc 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -44,7 +44,6 @@ vlVdpVideoMixerCreate(VdpDevice device, VdpVideoMixer *mixer) { vlVdpVideoMixer *vmixer = NULL; - struct pipe_video_context *context; VdpStatus ret; float csc[16]; @@ -54,8 +53,6 @@ vlVdpVideoMixerCreate(VdpDevice device, if (!dev) return VDP_STATUS_INVALID_HANDLE; - context = dev->context->vpipe; - vmixer = CALLOC(1, sizeof(vlVdpVideoMixer)); if (!vmixer) return VDP_STATUS_RESOURCES; diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index b45f699b83f..fc9e02ded47 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -41,7 +41,6 @@ vlVdpOutputSurfaceCreate(VdpDevice device, VdpOutputSurface *surface) { struct pipe_context *pipe; - struct pipe_video_context *context; struct pipe_resource res_tmpl, *res; struct pipe_sampler_view sv_templ; struct pipe_surface surf_templ; @@ -57,8 +56,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, return VDP_STATUS_INVALID_HANDLE; pipe = dev->context->pipe; - context = dev->context->vpipe; - if (!pipe || !context) + if (!pipe) return VDP_STATUS_INVALID_HANDLE; vlsurface = CALLOC(1, sizeof(vlVdpOutputSurface)); @@ -76,7 +74,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; res_tmpl.usage = PIPE_USAGE_STATIC; - res = context->screen->resource_create(context->screen, &res_tmpl); + res = pipe->screen->resource_create(pipe->screen, &res_tmpl); if (!res) { FREE(dev); return VDP_STATUS_ERROR; diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index 0f87ca78972..16beb289c42 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -40,7 +40,6 @@ vlVdpPresentationQueueCreate(VdpDevice device, VdpPresentationQueue *presentation_queue) { vlVdpPresentationQueue *pq = NULL; - struct pipe_video_context *context; VdpStatus ret; VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating PresentationQueue\n"); @@ -59,8 +58,6 @@ vlVdpPresentationQueueCreate(VdpDevice device, if (dev != pqt->device) return VDP_STATUS_HANDLE_DEVICE_MISMATCH; - context = dev->context->vpipe; - pq = CALLOC(1, sizeof(vlVdpPresentationQueue)); if (!pq) return VDP_STATUS_RESOURCES; @@ -175,9 +172,9 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vl_compositor_render(&pq->compositor, PIPE_MPEG12_PICTURE_TYPE_FRAME, drawable_surface, NULL, NULL); - pq->device->context->vpipe->screen->flush_frontbuffer + pq->device->context->pipe->screen->flush_frontbuffer ( - pq->device->context->vpipe->screen, + pq->device->context->pipe->screen, drawable_surface->texture, 0, 0, vl_contextprivate_get(pq->device->context, drawable_surface) diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index b8c4d2cd150..877d0259c56 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -28,7 +28,6 @@ #include <assert.h> -#include <pipe/p_video_context.h> #include <pipe/p_state.h> #include <util/u_memory.h> @@ -161,7 +160,6 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, { enum pipe_format pformat = FormatToPipe(source_ycbcr_format); struct pipe_context *pipe; - struct pipe_video_context *context; struct pipe_sampler_view **sampler_views; unsigned i; @@ -173,8 +171,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, return VDP_STATUS_INVALID_HANDLE; pipe = p_surf->device->context->pipe; - context = p_surf->device->context->vpipe; - if (!pipe && !context) + if (!pipe) return VDP_STATUS_INVALID_HANDLE; if (p_surf->video_buffer == NULL || pformat != p_surf->video_buffer->buffer_format) { diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index ada17dfadc9..8a97c99bda9 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -34,7 +34,7 @@ #include <vdpau/vdpau_x11.h> #include <pipe/p_compiler.h> -#include <pipe/p_video_context.h> +#include <pipe/p_video_decoder.h> #include <util/u_debug.h> #include <vl/vl_compositor.h> 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; |