diff options
author | Jakob Bornecrantz <wallbraker@gmail.com> | 2011-02-19 16:24:48 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-02-26 14:58:40 +0100 |
commit | 0bdc24e6485cf475d788439febc1c23e2a661cb4 (patch) | |
tree | 74961b493bf250694f4c266bd8e4a609aff7b0c3 | |
parent | 272dc1eb5b2ee535e31bb7469965eb8d38509781 (diff) |
draw: Flush on vertex elements change
We could improve this by only flushing the frontend and the fetch part
of the middle. This would avoid recalculating the emit keys.
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 7aba58f45c..2e38dacd1f 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -330,6 +330,9 @@ draw_set_vertex_elements(struct draw_context *draw, { assert(count <= PIPE_MAX_ATTRIBS); + /* XXX: flush only the fetch part */ + draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); + memcpy(draw->pt.vertex_element, elements, count * sizeof(elements[0])); draw->pt.nr_vertex_elements = count; } |