diff options
author | Christian König <[email protected]> | 2011-07-08 12:15:48 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-08 12:15:48 +0200 |
commit | 06ddbc3b8e58a6cf22708263a8b7d16cf1db5dbc (patch) | |
tree | 1c712b07bac17c050c1bfd9912a07452c8d68949 /src | |
parent | 2ec350ff1d9f13ec95d7b9d46f57ad9b9efcc8ea (diff) |
[g3dvl] remove create_surface from video context
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_context.c | 13 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_video_context.h | 7 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 9 | ||||
-rw-r--r-- | src/gallium/winsys/g3dvl/dri/dri_winsys.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/g3dvl/xlib/xsp_winsys.c | 6 |
5 files changed, 10 insertions, 27 deletions
diff --git a/src/gallium/auxiliary/vl/vl_context.c b/src/gallium/auxiliary/vl/vl_context.c index 87de24c5402..b3340cbe256 100644 --- a/src/gallium/auxiliary/vl/vl_context.c +++ b/src/gallium/auxiliary/vl/vl_context.c @@ -45,18 +45,6 @@ vl_context_destroy(struct pipe_video_context *context) FREE(ctx); } -static struct pipe_surface * -vl_context_create_surface(struct pipe_video_context *context, - struct pipe_resource *resource, - const struct pipe_surface *templ) -{ - struct vl_context *ctx = (struct vl_context*)context; - - assert(ctx); - - return ctx->pipe->create_surface(ctx->pipe, resource, templ); -} - static struct pipe_sampler_view * vl_context_create_sampler_view(struct pipe_video_context *context, struct pipe_resource *resource, @@ -232,7 +220,6 @@ vl_create_context(struct pipe_context *pipe) ctx->base.screen = pipe->screen; ctx->base.destroy = vl_context_destroy; - ctx->base.create_surface = vl_context_create_surface; ctx->base.create_sampler_view = vl_context_create_sampler_view; ctx->base.clear_sampler = vl_context_clear_sampler; ctx->base.upload_sampler = vl_context_upload_sampler; diff --git a/src/gallium/include/pipe/p_video_context.h b/src/gallium/include/pipe/p_video_context.h index 78cf43e2edc..567a892e830 100644 --- a/src/gallium/include/pipe/p_video_context.h +++ b/src/gallium/include/pipe/p_video_context.h @@ -56,13 +56,6 @@ struct pipe_video_context void (*destroy)(struct pipe_video_context *context); /** - * create a surface of a texture - */ - struct pipe_surface *(*create_surface)(struct pipe_video_context *context, - struct pipe_resource *resource, - const struct pipe_surface *templ); - - /** * sampler view handling, used for subpictures for example */ /*@{*/ diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 72e63fc2f32..b45f699b83f 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -30,6 +30,7 @@ #include <util/u_debug.h> #include <util/u_memory.h> +#include <util/u_sampler.h> #include "vdpau_private.h" @@ -39,6 +40,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, uint32_t width, uint32_t height, VdpOutputSurface *surface) { + struct pipe_context *pipe; struct pipe_video_context *context; struct pipe_resource res_tmpl, *res; struct pipe_sampler_view sv_templ; @@ -54,8 +56,9 @@ vlVdpOutputSurfaceCreate(VdpDevice device, if (!dev) return VDP_STATUS_INVALID_HANDLE; + pipe = dev->context->pipe; context = dev->context->vpipe; - if (!context) + if (!pipe || !context) return VDP_STATUS_INVALID_HANDLE; vlsurface = CALLOC(1, sizeof(vlVdpOutputSurface)); @@ -85,7 +88,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, // as long as we don't have a background picture we don't want an alpha channel sv_templ.swizzle_a = PIPE_SWIZZLE_ONE; - vlsurface->sampler_view = context->create_sampler_view(context, res, &sv_templ); + vlsurface->sampler_view = pipe->create_sampler_view(pipe, res, &sv_templ); if (!vlsurface->sampler_view) { FREE(dev); return VDP_STATUS_ERROR; @@ -94,7 +97,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, memset(&surf_templ, 0, sizeof(surf_templ)); surf_templ.format = res->format; surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - vlsurface->surface = context->create_surface(context, res, &surf_templ); + vlsurface->surface = pipe->create_surface(pipe, res, &surf_templ); if (!vlsurface->surface) { FREE(dev); return VDP_STATUS_ERROR; diff --git a/src/gallium/winsys/g3dvl/dri/dri_winsys.c b/src/gallium/winsys/g3dvl/dri/dri_winsys.c index 42b33d191d4..29b7d3ea468 100644 --- a/src/gallium/winsys/g3dvl/dri/dri_winsys.c +++ b/src/gallium/winsys/g3dvl/dri/dri_winsys.c @@ -95,7 +95,7 @@ vl_dri2_get_front(struct vl_context *vctx, Drawable drawable) memset(&surf_template, 0, sizeof(surf_template)); surf_template.format = front_tex->format; surf_template.usage = PIPE_BIND_RENDER_TARGET; - front_surf = vctx->vpipe->create_surface(vctx->vpipe, front_tex, &surf_template); + front_surf = vctx->pipe->create_surface(vctx->pipe, front_tex, &surf_template); } pipe_resource_reference(&front_tex, NULL); Xfree(dri2_front); diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c index 3caf6603243..5cea6196cf7 100644 --- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c +++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c @@ -99,8 +99,8 @@ vl_drawable_surface_get(struct vl_context *vctx, Drawable drawable) memset(&surf_template, 0, sizeof(surf_template)); surf_template.format = templat.format; surf_template.usage = PIPE_BIND_RENDER_TARGET; - xsp_screen->drawable_surface = vctx->vpipe->create_surface(vctx->vpipe, drawable_tex, - &surf_template); + xsp_screen->drawable_surface = vctx->pipe->create_surface(vctx->pipe, drawable_tex, + &surf_template); pipe_resource_reference(&drawable_tex, NULL); if (!xsp_screen->drawable_surface) @@ -172,7 +172,7 @@ void vl_screen_destroy(struct vl_screen *vscreen) struct vl_context* vl_video_create(struct vl_screen *vscreen) { - struct pipe_video_context *pipe; + struct pipe_context *pipe; struct pipe_video_context *vpipe; struct vl_context *vctx; |