diff options
author | Christian König <[email protected]> | 2011-04-17 21:31:31 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-04-17 21:31:31 +0200 |
commit | 38a315b7049946d124409b377e622994feccdcb7 (patch) | |
tree | 37b6ee4d81e0dbe6f88743576d94de681f7a8ae3 | |
parent | b8a6e0e6fc451096d684a1e18529ab4879cdba0a (diff) |
[g3dvl] no need for seperate mv vertex states any more
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_decoder.h | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_vertex_buffers.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_vertex_buffers.h | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index 1d8f0f92c37..10c9c646a51 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -289,8 +289,7 @@ vl_mpeg12_destroy(struct pipe_video_decoder *decoder) for (i = 0; i < VL_MAX_PLANES; ++i) dec->pipe->delete_vertex_elements_state(dec->pipe, dec->ves_eb[i]); - for (i = 0; i < 2; ++i) - dec->pipe->delete_vertex_elements_state(dec->pipe, dec->ves_mv[i]); + dec->pipe->delete_vertex_elements_state(dec->pipe, dec->ves_mv); pipe_resource_reference(&dec->quads.buffer, NULL); pipe_resource_reference(&dec->pos.buffer, NULL); @@ -476,6 +475,7 @@ vl_mpeg12_decoder_flush_buffer(struct pipe_video_decode_buffer *buffer, vb[0] = dec->quads; vb[1] = dec->pos; + dec->pipe->bind_vertex_elements_state(dec->pipe, dec->ves_mv); for (i = 0; i < VL_MAX_PLANES; ++i) { vl_mc_set_surface(&buf->mc[i], surfaces[i]); @@ -485,7 +485,6 @@ vl_mpeg12_decoder_flush_buffer(struct pipe_video_decode_buffer *buffer, vb[2] = vl_vb_get_mv(&buf->vertex_stream, j);; dec->pipe->set_vertex_buffers(dec->pipe, 3, vb); - dec->pipe->bind_vertex_elements_state(dec->pipe, dec->ves_mv[j]); vl_mc_render_ref(&buf->mc[i], sv[j][i]); } } @@ -710,8 +709,7 @@ vl_create_mpeg12_decoder(struct pipe_video_context *context, for (i = 0; i < VL_MAX_PLANES; ++i) dec->ves_eb[i] = vl_vb_get_ves_eb(dec->pipe, i); - for (i = 0; i < 2; ++i) - dec->ves_mv[i] = vl_vb_get_ves_mv(dec->pipe, i); + dec->ves_mv = vl_vb_get_ves_mv(dec->pipe); /* TODO: Implement 422, 444 */ assert(dec->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420); diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h index 2bd5591b463..6a6fabdb188 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h @@ -55,7 +55,7 @@ struct vl_mpeg12_decoder struct pipe_vertex_buffer pos; void *ves_eb[VL_MAX_PLANES]; - void *ves_mv[2]; + void *ves_mv; struct vl_idct idct_y, idct_c; struct vl_mc mc_y, mc_c; diff --git a/src/gallium/auxiliary/vl/vl_vertex_buffers.c b/src/gallium/auxiliary/vl/vl_vertex_buffers.c index c923686b06e..76142559cc8 100644 --- a/src/gallium/auxiliary/vl/vl_vertex_buffers.c +++ b/src/gallium/auxiliary/vl/vl_vertex_buffers.c @@ -205,7 +205,7 @@ vl_vb_get_ves_eb(struct pipe_context *pipe, int component) } void * -vl_vb_get_ves_mv(struct pipe_context *pipe, int motionvector) +vl_vb_get_ves_mv(struct pipe_context *pipe) { struct pipe_vertex_element vertex_elems[NUM_VS_INPUTS]; diff --git a/src/gallium/auxiliary/vl/vl_vertex_buffers.h b/src/gallium/auxiliary/vl/vl_vertex_buffers.h index bafaff7a311..ce169ccf640 100644 --- a/src/gallium/auxiliary/vl/vl_vertex_buffers.h +++ b/src/gallium/auxiliary/vl/vl_vertex_buffers.h @@ -76,7 +76,7 @@ struct pipe_vertex_buffer vl_vb_upload_pos(struct pipe_context *pipe, unsigned w void *vl_vb_get_ves_eb(struct pipe_context *pipe, int component); -void *vl_vb_get_ves_mv(struct pipe_context *pipe, int motionvector); +void *vl_vb_get_ves_mv(struct pipe_context *pipe); void vl_vb_init(struct vl_vertex_buffer *buffer, struct pipe_context *pipe, |