broadcom/vc5: Disable TF on V3D 4.x when drawing with queries disabled.
authorEric Anholt <eric@anholt.net>
Fri, 23 Mar 2018 22:43:50 +0000 (15:43 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 27 Mar 2018 00:46:19 +0000 (17:46 -0700)
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
src/gallium/drivers/vc5/vc5_query.c

index a98fd037d089619871c0f2889dbf8882434f9154..d5bf2824d29cc8d6cc26c85c793885aee3f5c615 100644 (file)
@@ -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 */
                 }
         }
 
index 5ec9be2e356f04f9cf7a279c9ad24d5028354648..9aa80cf536abf4f29c7201a89b1738a5e544b2b3 100644 (file)
@@ -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