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

Author: Eric Anholt <e...@anholt.net>
Date:   Fri Mar 23 15:43:50 2018 -0700

broadcom/vc5: Disable TF on V3D 4.x when drawing with queries disabled.

On 3.x, we just don't flag the primitive as needing TF, but those
primitive bits are now allocated to the new primitive types.  Now we need
to actually update the enable flag at draw time.

---

 src/gallium/drivers/vc5/vc5_emit.c  | 7 +++++++
 src/gallium/drivers/vc5/vc5_query.c | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/gallium/drivers/vc5/vc5_emit.c 
b/src/gallium/drivers/vc5/vc5_emit.c
index a98fd037d0..d5bf2824d2 100644
--- a/src/gallium/drivers/vc5/vc5_emit.c
+++ b/src/gallium/drivers/vc5/vc5_emit.c
@@ -604,6 +604,13 @@ v3dX(emit_state)(struct pipe_context *pctx)
                         for (int i = 0; i < vc5->prog.bind_vs->num_tf_specs; 
i++) {
                                 cl_emit_prepacked(&job->bcl, &tf_specs[i]);
                         }
+                } else if (job->tf_enabled) {
+#if V3D_VERSION >= 40
+                        cl_emit(&job->bcl, TRANSFORM_FEEDBACK_SPECS, tfe) {
+                                tfe.enable = false;
+                        };
+                        job->tf_enabled = false;
+#endif /* V3D_VERSION >= 40 */
                 }
         }
 
diff --git a/src/gallium/drivers/vc5/vc5_query.c 
b/src/gallium/drivers/vc5/vc5_query.c
index 5ec9be2e35..9aa80cf536 100644
--- a/src/gallium/drivers/vc5/vc5_query.c
+++ b/src/gallium/drivers/vc5/vc5_query.c
@@ -164,6 +164,7 @@ vc5_set_active_query_state(struct pipe_context *pctx, 
boolean enable)
 
         vc5->active_queries = enable;
         vc5->dirty |= VC5_DIRTY_OQ;
+        vc5->dirty |= VC5_DIRTY_STREAMOUT;
 }
 
 void

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to