Mesa (master): ilo: flush before setting SOL_RESET

Chia-I Wu olv at kemper.freedesktop.org
Mon Sep 22 04:19:32 UTC 2014


Module: Mesa
Branch: master
Commit: 672592de7e4b05b13765f5eac777e5427f84c0f0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=672592de7e4b05b13765f5eac777e5427f84c0f0

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Mon Sep 22 10:35:59 2014 +0800

ilo: flush before setting SOL_RESET

SOL_RESET happens before bo execution.  It should not be observed by the
commands that are already in the bo.

Move the code out of the pipeline now that it submits.

---

 src/gallium/drivers/ilo/ilo_3d.c          |    8 ++++++++
 src/gallium/drivers/ilo/ilo_3d_pipeline.c |    5 -----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c
index 066a4df..4bc70c6 100644
--- a/src/gallium/drivers/ilo/ilo_3d.c
+++ b/src/gallium/drivers/ilo/ilo_3d.c
@@ -360,6 +360,14 @@ draw_vbo(struct ilo_3d *hw3d, const struct ilo_state_vector *vec)
    bool success;
    int max_len, before_space;
 
+   /* on GEN7+, we need SOL_RESET to reset the SO write offsets */
+   if (ilo_dev_gen(hw3d->pipeline->dev) >= ILO_GEN(7) &&
+       (vec->dirty & ILO_DIRTY_SO) && vec->so.enabled &&
+       !vec->so.append_bitmask) {
+      ilo_cp_submit(hw3d->cp, "SOL_RESET");
+      ilo_cp_set_one_off_flags(hw3d->cp, INTEL_EXEC_GEN7_SOL_RESET);
+   }
+
    ilo_3d_own_render_ring(hw3d);
 
    if (!hw3d->new_batch) {
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline.c b/src/gallium/drivers/ilo/ilo_3d_pipeline.c
index cfe3c5d..298c2ec 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline.c
@@ -154,11 +154,6 @@ ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p,
 {
    bool success;
 
-   /* on GEN7+, we need SOL_RESET to reset the SO write offsets */
-   if (ilo_dev_gen(p->dev) >= ILO_GEN(7) && (vec->dirty & ILO_DIRTY_SO) &&
-       vec->so.enabled && !vec->so.append_bitmask)
-      ilo_cp_set_one_off_flags(p->cp, INTEL_EXEC_GEN7_SOL_RESET);
-
    while (true) {
       struct ilo_builder_snapshot snapshot;
 




More information about the mesa-commit mailing list