From: Jakob Bornecrantz <[email protected]>

We could improve this by only flushing the frontend and the fetch part
of the middle. This would avoid recalculating the emit keys.

Reviewed-by: Stéphane Marchesin <[email protected]>
Tested-by: Stéphane Marchesin <[email protected]>
---
 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 7b33017..2d497ca 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -355,6 +355,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;
 }
-- 
1.7.6.5

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to