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

Author: Eric Anholt <[email protected]>
Date:   Thu Sep 13 12:59:13 2018 -0700

v3d: Stop clearing the OQ state at the end of the job.

Ever since we added OQ support, we've been clearing OQ state at the start
of the job anyway.  We're intentionally breaking old-and-new-driver-mix
systems, because we need to stop using the unvalidated FLUSH_ALL_STATE.

---

 src/gallium/drivers/v3d/v3d_context.h | 7 -------
 src/gallium/drivers/v3d/v3dx_emit.c   | 3 +--
 src/gallium/drivers/v3d/v3dx_job.c    | 9 ---------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/src/gallium/drivers/v3d/v3d_context.h 
b/src/gallium/drivers/v3d/v3d_context.h
index 20f357ae4a..70643e000b 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -301,13 +301,6 @@ struct v3d_job {
         bool needs_flush;
 
         /**
-         * Set if there is a nonzero address for OCCLUSION_QUERY_COUNTER.  If
-         * so, we need to disable it and flush before ending the CL, to keep
-         * the next tile from starting with it enabled.
-         */
-        bool oq_enabled;
-
-        /**
          * Set if a packet enabling TF has been emitted in the job (V3D 4.x).
          */
         bool tf_enabled;
diff --git a/src/gallium/drivers/v3d/v3dx_emit.c 
b/src/gallium/drivers/v3d/v3dx_emit.c
index 50f9f60477..0d14bcf4dd 100644
--- a/src/gallium/drivers/v3d/v3dx_emit.c
+++ b/src/gallium/drivers/v3d/v3dx_emit.c
@@ -776,8 +776,7 @@ v3dX(emit_state)(struct pipe_context *pctx)
 
         if (v3d->dirty & VC5_DIRTY_OQ) {
                 cl_emit(&job->bcl, OCCLUSION_QUERY_COUNTER, counter) {
-                        job->oq_enabled = v3d->active_queries && 
v3d->current_oq;
-                        if (job->oq_enabled) {
+                        if (v3d->active_queries && v3d->current_oq) {
                                 counter.address = cl_address(v3d->current_oq, 
0);
                         }
                 }
diff --git a/src/gallium/drivers/v3d/v3dx_job.c 
b/src/gallium/drivers/v3d/v3dx_job.c
index e0bd71fcf7..997c1b12d3 100644
--- a/src/gallium/drivers/v3d/v3dx_job.c
+++ b/src/gallium/drivers/v3d/v3dx_job.c
@@ -33,20 +33,11 @@
 void v3dX(bcl_epilogue)(struct v3d_context *v3d, struct v3d_job *job)
 {
                 v3d_cl_ensure_space_with_branch(&job->bcl,
-                                                
cl_packet_length(OCCLUSION_QUERY_COUNTER) +
 #if V3D_VERSION >= 41
                                                 
cl_packet_length(TRANSFORM_FEEDBACK_SPECS) +
 #endif
                                                 
cl_packet_length(FLUSH_ALL_STATE));
 
-                if (job->oq_enabled) {
-                        /* Disable the OQ at the end of the CL, so that the
-                         * draw calls at the start of the CL don't inherit the
-                         * OQ counter.
-                         */
-                        cl_emit(&job->bcl, OCCLUSION_QUERY_COUNTER, counter);
-                }
-
                 /* Disable TF at the end of the CL, so that the TF block
                  * cleans up and finishes before it gets reset by the next
                  * frame's tile binning mode cfg packet. (SWVC5-718).

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to