diff options
author | Roland Scheidegger <sroland@vmware.com> | 2010-03-01 18:40:22 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2010-03-01 18:40:22 +0100 |
commit | ac4abaecd5f52e416c89bfe19b34ed7f4e014b21 (patch) | |
tree | 8fbf728257eda0df640933d3581a8d3f1d630302 /src/gallium/auxiliary/util/u_draw_quad.c | |
parent | 18603a2f07b99bfdbaab35b38b292233fc3e7689 (diff) |
util: adapt blitter code to new vertex element cso
The interface of util_draw_vertex_buffer looks a bit odd (calling code has to
set vertex elements but not vertex buffers) but due to the way cso state
handling generally works (can't re-bind original vertex element state easily
there) I guess that's ok for now.
Diffstat (limited to 'src/gallium/auxiliary/util/u_draw_quad.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_draw_quad.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/util/u_draw_quad.c b/src/gallium/auxiliary/util/u_draw_quad.c index 36e9a4941f..8c194102bf 100644 --- a/src/gallium/auxiliary/util/u_draw_quad.c +++ b/src/gallium/auxiliary/util/u_draw_quad.c @@ -45,8 +45,6 @@ util_draw_vertex_buffer(struct pipe_context *pipe, uint num_attribs) { struct pipe_vertex_buffer vbuffer; - struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS]; - uint i; assert(num_attribs <= PIPE_MAX_ATTRIBS); @@ -58,14 +56,7 @@ util_draw_vertex_buffer(struct pipe_context *pipe, vbuffer.max_index = num_verts - 1; pipe->set_vertex_buffers(pipe, 1, &vbuffer); - /* tell pipe about the vertex attributes */ - for (i = 0; i < num_attribs; i++) { - velements[i].src_offset = i * 4 * sizeof(float); - velements[i].instance_divisor = 0; - velements[i].vertex_buffer_index = 0; - velements[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - } - pipe->set_vertex_elements(pipe, num_attribs, velements); + /* note: vertex elements already set by caller */ /* draw */ pipe->draw_arrays(pipe, prim_type, 0, num_verts); |