aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-03-26 00:20:16 +0100
committerChristian König <[email protected]>2011-03-26 00:20:16 +0100
commit3d40d4f391e2fc319a03d8f171a2cfb9daf250c8 (patch)
treeee23fe5dbe9ebd6c235ccd8abb31c8da4b9415d8 /src/gallium/auxiliary/vl
parent4a0b80f00dbc77d333027afd195daae7ef1e651c (diff)
[g3dvl] throw out all unused parts of the interface
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c14
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.h8
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_context.c122
3 files changed, 1 insertions, 143 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index cef8b6992ab..278f86bc54a 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -345,8 +345,6 @@ bool vl_compositor_init(struct vl_compositor *compositor, struct pipe_context *p
compositor->fb_state.width = 0;
compositor->fb_state.height = 0;
- compositor->bg = NULL;
- compositor->dirty_bg = false;
for (i = 0; i < VL_COMPOSITOR_MAX_LAYERS; ++i)
compositor->layers[i] = NULL;
compositor->dirty_layers = 0;
@@ -484,16 +482,6 @@ static unsigned gen_data(struct vl_compositor *c,
if (!vb)
return 0;
- if (c->dirty_bg) {
- struct vertex2f bg_inv_size = {1.0f / c->bg->texture->width0, 1.0f / c->bg->texture->height0};
- gen_rect_verts(num_rects, &c->bg_src_rect, &bg_inv_size, NULL, NULL, vb);
- textures[num_rects] = c->bg;
- /* XXX: Hack */
- frag_shaders[num_rects] = c->fragment_shader.rgb_2_rgb;
- ++num_rects;
- c->dirty_bg = false;
- }
-
{
struct vertex2f src_inv_size = { 1.0f / src_surface->texture->width0, 1.0f / src_surface->texture->height0};
gen_rect_verts(num_rects, src_rect, &src_inv_size, dst_rect, &c->fb_inv_size, vb);
@@ -613,7 +601,7 @@ void vl_compositor_render(struct vl_compositor *compositor,
draw_layers(compositor, src_surface, src_area, dst_area);
- assert(!compositor->dirty_bg && !compositor->dirty_layers);
+ assert(!compositor->dirty_layers);
compositor->pipe->flush(compositor->pipe, fence);
}
diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h
index c2de98de0ef..8bea7ab39cf 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.h
+++ b/src/gallium/auxiliary/vl/vl_compositor.h
@@ -57,9 +57,6 @@ struct vl_compositor
void *vertex_elems_state;
struct pipe_resource *fs_const_buf;
- struct pipe_sampler_view *bg;
- struct pipe_video_rect bg_src_rect;
- bool dirty_bg;
struct pipe_sampler_view *layers[VL_COMPOSITOR_MAX_LAYERS];
struct pipe_video_rect layer_src_rects[VL_COMPOSITOR_MAX_LAYERS];
struct pipe_video_rect layer_dst_rects[VL_COMPOSITOR_MAX_LAYERS];
@@ -72,11 +69,6 @@ bool vl_compositor_init(struct vl_compositor *compositor, struct pipe_context *p
void vl_compositor_cleanup(struct vl_compositor *compositor);
-#if 0
-void vl_compositor_set_background(struct vl_compositor *compositor,
- struct pipe_surface *bg, struct pipe_video_rect *bg_src_rect);
-#endif
-
void vl_compositor_set_layers(struct vl_compositor *compositor,
struct pipe_sampler_view *layers[],
struct pipe_video_rect *src_rects[],
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_context.c b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
index 185380ed216..af1079e480b 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_context.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
@@ -365,105 +365,6 @@ vl_mpeg12_is_format_supported(struct pipe_video_context *vpipe,
0, usage);
}
-#if 0
-static void
-vl_mpeg12_resource_copy_region(struct pipe_video_context *vpipe,
- struct pipe_resource *dst,
- unsigned dstx, unsigned dsty, unsigned dstz,
- struct pipe_resource *src,
- unsigned srcx, unsigned srcy, unsigned srcz,
- unsigned width, unsigned height)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(dst);
-
- struct pipe_box box;
- box.x = srcx;
- box.y = srcy;
- box.z = srcz;
- box.width = width;
- box.height = height;
-
- if (ctx->pipe->resource_copy_region)
- ctx->pipe->resource_copy_region(ctx->pipe, dst, 0,
- dstx, dsty, dstz,
- src, 0, &box);
- else
- util_resource_copy_region(ctx->pipe, dst, 0,
- dstx, dsty, dstz,
- src, 0, &box);
-}
-
-static struct pipe_transfer*
-vl_mpeg12_get_transfer(struct pipe_video_context *vpipe,
- struct pipe_resource *resource,
- unsigned level,
- unsigned usage, /* a combination of PIPE_TRANSFER_x */
- const struct pipe_box *box)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(resource);
- assert(box);
-
- return ctx->pipe->get_transfer(ctx->pipe, resource, level, usage, box);
-}
-
-static void
-vl_mpeg12_transfer_destroy(struct pipe_video_context *vpipe,
- struct pipe_transfer *transfer)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(transfer);
-
- ctx->pipe->transfer_destroy(ctx->pipe, transfer);
-}
-
-static void*
-vl_mpeg12_transfer_map(struct pipe_video_context *vpipe,
- struct pipe_transfer *transfer)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(transfer);
-
- return ctx->pipe->transfer_map(ctx->pipe, transfer);
-}
-
-static void
-vl_mpeg12_transfer_flush_region(struct pipe_video_context *vpipe,
- struct pipe_transfer *transfer,
- const struct pipe_box *box)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(transfer);
- assert(box);
-
- ctx->pipe->transfer_flush_region(ctx->pipe, transfer, box);
-}
-
-static void
-vl_mpeg12_transfer_unmap(struct pipe_video_context *vpipe,
- struct pipe_transfer *transfer)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(transfer);
-
- ctx->pipe->transfer_unmap(ctx->pipe, transfer);
-}
-
-#endif
-
static void
vl_mpeg12_clear_sampler(struct pipe_video_context *vpipe,
struct pipe_sampler_view *dst,
@@ -558,22 +459,6 @@ vl_mpeg12_render_picture(struct pipe_video_context *vpipe,
dst_surface, dst_area, fence);
}
-#if 0
-static void
-vl_mpeg12_set_picture_background(struct pipe_video_context *vpipe,
- struct pipe_surface *bg,
- struct pipe_video_rect *bg_src_rect)
-{
- struct vl_mpeg12_context *ctx = (struct vl_mpeg12_context*)vpipe;
-
- assert(vpipe);
- assert(bg);
- assert(bg_src_rect);
-
- vl_compositor_set_background(&ctx->compositor, bg, bg_src_rect);
-}
-#endif
-
static void
vl_mpeg12_set_picture_layers(struct pipe_video_context *vpipe,
struct pipe_sampler_view *layers[],
@@ -759,14 +644,7 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
ctx->base.create_buffer = vl_mpeg12_create_buffer;
ctx->base.render_picture = vl_mpeg12_render_picture;
ctx->base.clear_sampler = vl_mpeg12_clear_sampler;
- //ctx->base.resource_copy_region = vl_mpeg12_resource_copy_region;
- //ctx->base.get_transfer = vl_mpeg12_get_transfer;
- //ctx->base.transfer_destroy = vl_mpeg12_transfer_destroy;
- //ctx->base.transfer_map = vl_mpeg12_transfer_map;
- //ctx->base.transfer_flush_region = vl_mpeg12_transfer_flush_region;
- //ctx->base.transfer_unmap = vl_mpeg12_transfer_unmap;
ctx->base.upload_sampler = vl_mpeg12_upload_sampler;
- //ctx->base.set_picture_background = vl_mpeg12_set_picture_background;
ctx->base.set_picture_layers = vl_mpeg12_set_picture_layers;
ctx->base.set_csc_matrix = vl_mpeg12_set_csc_matrix;