diff options
author | Marek Olšák <[email protected]> | 2012-04-11 15:51:52 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-24 01:39:21 +0200 |
commit | 0f00786868720d8b56bdf31cb28ece7590b16809 (patch) | |
tree | 8c446f4e676c57eff86c5ff752d8d7c9111b5a5e /src | |
parent | 76eefcc70cc62db7d226591de3f918ff102f6de3 (diff) |
gallium/util: use cso_draw_arrays in util_draw_vertex_buffer
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/util/u_draw_quad.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_draw_quad.c b/src/gallium/auxiliary/util/u_draw_quad.c index 8ed3b3c0959..590fa0c36bb 100644 --- a/src/gallium/auxiliary/util/u_draw_quad.c +++ b/src/gallium/auxiliary/util/u_draw_quad.c @@ -57,16 +57,15 @@ util_draw_vertex_buffer(struct pipe_context *pipe, vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */ vbuffer.buffer_offset = offset; + /* note: vertex elements already set by caller */ + if (cso) { cso_set_vertex_buffers(cso, 1, &vbuffer); + cso_draw_arrays(cso, prim_type, 0, num_verts); } else { pipe->set_vertex_buffers(pipe, 1, &vbuffer); + util_draw_arrays(pipe, prim_type, 0, num_verts); } - - /* note: vertex elements already set by caller */ - - /* draw */ - util_draw_arrays(pipe, prim_type, 0, num_verts); } |