summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h1
-rw-r--r--src/gallium/auxiliary/draw/draw_pt.c10
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index d9f2d7368c..e3337eeae5 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -137,6 +137,7 @@ struct draw_context
struct draw_pt_front_end *frontend;
unsigned prim;
unsigned opt;
+ unsigned eltSize; /* saved eltSize for flushing */
struct {
struct draw_pt_middle_end *fetch_emit;
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 500c24da1b..6d3ccc28ef 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -52,7 +52,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE)
* - backend -- the vbuf_render provided by the driver.
*/
static boolean
-draw_pt_arrays(struct draw_context *draw,
+draw_pt_arrays(struct draw_context *draw,
unsigned prim,
unsigned start,
unsigned count)
@@ -108,7 +108,10 @@ draw_pt_arrays(struct draw_context *draw,
frontend = draw->pt.frontend;
- if (frontend && (draw->pt.prim != prim || opt != draw->pt.opt)) {
+ if (frontend && (draw->pt.prim != prim ||
+ draw->pt.opt != opt ||
+ draw->pt.eltSize != draw->pt.user.eltSize)) {
+ /* XXX: flush only the frontend if eltSize changed */
frontend->flush( frontend, DRAW_FLUSH_STATE_CHANGE );
frontend = NULL;
}
@@ -118,9 +121,10 @@ draw_pt_arrays(struct draw_context *draw,
frontend->prepare( frontend, prim, middle, opt );
+ draw->pt.frontend = frontend;
+ draw->pt.eltSize = draw->pt.user.eltSize;
draw->pt.prim = prim;
draw->pt.opt = opt;
- draw->pt.frontend = frontend;
}
frontend->run( frontend, start, count );