summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_vertex_buffers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_vertex_buffers.c')
-rw-r--r--src/gallium/auxiliary/vl/vl_vertex_buffers.c49
1 files changed, 2 insertions, 47 deletions
diff --git a/src/gallium/auxiliary/vl/vl_vertex_buffers.c b/src/gallium/auxiliary/vl/vl_vertex_buffers.c
index b7aa14bb4db..281db8018eb 100644
--- a/src/gallium/auxiliary/vl/vl_vertex_buffers.c
+++ b/src/gallium/auxiliary/vl/vl_vertex_buffers.c
@@ -125,49 +125,6 @@ vl_vb_upload_pos(struct pipe_context *pipe, unsigned width, unsigned height)
return pos;
}
-struct pipe_vertex_buffer
-vl_vb_upload_block_num(struct pipe_context *pipe, unsigned num_blocks)
-{
- struct pipe_vertex_buffer buf;
- struct pipe_transfer *buf_transfer;
- struct vertex2s *v;
- unsigned i;
-
- assert(pipe);
-
- /* create buffer */
- buf.stride = sizeof(struct vertex2s);
- buf.buffer_offset = 0;
- buf.buffer = pipe_buffer_create
- (
- pipe->screen,
- PIPE_BIND_VERTEX_BUFFER,
- PIPE_USAGE_STATIC,
- sizeof(struct vertex2s) * num_blocks
- );
-
- if(!buf.buffer)
- return buf;
-
- /* and fill it */
- v = pipe_buffer_map
- (
- pipe,
- buf.buffer,
- PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
- &buf_transfer
- );
-
- for ( i = 0; i < num_blocks; ++i, ++v) {
- v->x = i;
- v->y = i;
- }
-
- pipe_buffer_unmap(pipe, buf_transfer);
-
- return buf;
-}
-
static struct pipe_vertex_element
vl_vb_get_quad_vertex_element(void)
{
@@ -211,12 +168,10 @@ vl_vb_get_ves_ycbcr(struct pipe_context *pipe)
/* Position element */
vertex_elems[VS_I_VPOS].src_format = PIPE_FORMAT_R8G8B8A8_USCALED;
- vl_vb_element_helper(&vertex_elems[VS_I_VPOS], 1, 1);
-
/* block num element */
- vertex_elems[VS_I_BLOCK_NUM].src_format = PIPE_FORMAT_R16G16_SSCALED;
+ vertex_elems[VS_I_BLOCK_NUM].src_format = PIPE_FORMAT_R32_FLOAT;
- vl_vb_element_helper(&vertex_elems[VS_I_BLOCK_NUM], 1, 2);
+ vl_vb_element_helper(&vertex_elems[VS_I_VPOS], 2, 1);
return pipe->create_vertex_elements_state(pipe, 3, vertex_elems);
}