summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_mc.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-17 18:53:22 +0200
committerChristian König <[email protected]>2011-04-17 18:53:22 +0200
commitb8a6e0e6fc451096d684a1e18529ab4879cdba0a (patch)
tree81b8fac092ebbd71c2ae4ae587bac0e5fc574584 /src/gallium/auxiliary/vl/vl_mc.c
parent0a2310b375068694d5700395aededc3fe68a0f3a (diff)
[g3dvl] give mv their own vertex buffer back
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_mc.c')
-rw-r--r--src/gallium/auxiliary/vl/vl_mc.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c
index 707a4a27077..2624d0502c1 100644
--- a/src/gallium/auxiliary/vl/vl_mc.c
+++ b/src/gallium/auxiliary/vl/vl_mc.c
@@ -612,17 +612,12 @@ prepare_pipe_4_rendering(struct vl_mc_buffer *buffer)
}
void
-vl_mc_render_ref(struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref,
- unsigned not_empty_start_instance, unsigned not_empty_num_instances,
- unsigned empty_start_instance, unsigned empty_num_instances)
+vl_mc_render_ref(struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref)
{
struct vl_mc *renderer;
assert(buffer && ref);
- if (not_empty_num_instances == 0 && empty_num_instances == 0)
- return;
-
prepare_pipe_4_rendering(buffer);
renderer = buffer->renderer;
@@ -633,24 +628,19 @@ vl_mc_render_ref(struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref,
renderer->pipe->set_fragment_sampler_views(renderer->pipe, 1, &ref);
renderer->pipe->bind_fragment_sampler_states(renderer->pipe, 1, &renderer->sampler_ref);
- if (not_empty_num_instances > 0)
- util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4,
- not_empty_start_instance, not_empty_num_instances);
-
- if (empty_num_instances > 0)
- util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4,
- empty_start_instance, empty_num_instances);
+ util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0,
+ renderer->buffer_width / MACROBLOCK_WIDTH *
+ renderer->buffer_height / MACROBLOCK_HEIGHT);
}
void
-vl_mc_render_ycbcr(struct vl_mc_buffer *buffer,
- unsigned not_empty_start_instance, unsigned not_empty_num_instances)
+vl_mc_render_ycbcr(struct vl_mc_buffer *buffer, unsigned num_instances)
{
struct vl_mc *renderer;
assert(buffer);
- if (not_empty_num_instances == 0)
+ if (num_instances == 0)
return;
prepare_pipe_4_rendering(buffer);
@@ -663,6 +653,5 @@ vl_mc_render_ycbcr(struct vl_mc_buffer *buffer,
renderer->pipe->set_fragment_sampler_views(renderer->pipe, 1, &buffer->source);
renderer->pipe->bind_fragment_sampler_states(renderer->pipe, 1, &renderer->sampler_ycbcr);
- util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4,
- not_empty_start_instance, not_empty_num_instances);
+ util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances);
}