summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_3d.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-05-22 15:33:15 +0800
committerChia-I Wu <[email protected]>2013-05-22 18:09:17 +0800
commitbbb30398e58440bf542427a408810cf0e31297b5 (patch)
tree81785247d10eafa2397a73410ce7ccca65866b02 /src/gallium/drivers/ilo/ilo_3d.c
parent08f87ac333512a77a2701268dd98ef4274c34832 (diff)
ilo: avoid unnecessary emission of SO states
No need to emit 3DSTATE_SO_BUFFER and 3DSTATE_SO_DECL_LIST when SO is disabled. As the implicit flush done by the commands is also gone, emit an explicit flush.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_3d.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c
index 817cf89adfe..980bdb4451e 100644
--- a/src/gallium/drivers/ilo/ilo_3d.c
+++ b/src/gallium/drivers/ilo/ilo_3d.c
@@ -376,13 +376,18 @@ draw_vbo(struct ilo_3d *hw3d, const struct ilo_context *ilo,
ilo_3d_own_render_ring(hw3d);
- /*
- * Without a better tracking mechanism, when the framebuffer changes, we
- * have to assume that the old framebuffer may be sampled from. If that
- * happens in the middle of a batch buffer, we need to insert manual
- * flushes.
- */
- need_flush = (!hw3d->new_batch && (ilo->dirty & ILO_DIRTY_FRAMEBUFFER));
+ if (!hw3d->new_batch) {
+ /*
+ * Without a better tracking mechanism, when the framebuffer changes, we
+ * have to assume that the old framebuffer may be sampled from. If that
+ * happens in the middle of a batch buffer, we need to insert manual
+ * flushes.
+ */
+ need_flush = (ilo->dirty & ILO_DIRTY_FRAMEBUFFER);
+
+ /* same to SO target changes */
+ need_flush |= (ilo->dirty & ILO_DIRTY_STREAM_OUTPUT_TARGETS);
+ }
/* make sure there is enough room first */
max_len = ilo_3d_pipeline_estimate_size(hw3d->pipeline,