Mesa (master): i965: Rename misleading "active" field of brw->query.

Eric Anholt anholt at kemper.freedesktop.org
Fri Oct 26 19:43:16 UTC 2012


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Oct 17 17:45:46 2012 -0700

i965: Rename misleading "active" field of brw->query.

"Active" is an already-used term for the query being between
glBeginQuery() and glEndQuery(), while this is tracking whether the
start of the packet pair for emitting state has been inserted into the
current batchbuffer.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_context.h  |    2 +-
 src/mesa/drivers/dri/i965/brw_queryobj.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index e1acc51..eca1d45 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1057,7 +1057,7 @@ struct brw_context
       struct brw_query_object *obj;
       drm_intel_bo *bo;
       int index;
-      bool active;
+      bool begin_emitted;
    } query;
    /* Used to give every program string a unique id
     */
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index 84da9e0..0e42f39 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -428,7 +428,7 @@ brw_emit_query_begin(struct brw_context *brw)
    struct brw_query_object *query = brw->query.obj;
 
    /* Skip if we're not doing any queries, or we've emitted the start. */
-   if (!query || brw->query.active)
+   if (!query || brw->query.begin_emitted)
       return;
 
    write_depth_count(intel, brw->query.bo, brw->query.index * 2);
@@ -441,7 +441,7 @@ brw_emit_query_begin(struct brw_context *brw)
       query->first_index = brw->query.index;
    }
    query->last_index = brw->query.index;
-   brw->query.active = true;
+   brw->query.begin_emitted = true;
 }
 
 /** Called at batchbuffer flush to get an ending PS_DEPTH_COUNT */
@@ -450,12 +450,12 @@ brw_emit_query_end(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
 
-   if (!brw->query.active)
+   if (!brw->query.begin_emitted)
       return;
 
    write_depth_count(intel, brw->query.bo, brw->query.index * 2 + 1);
 
-   brw->query.active = false;
+   brw->query.begin_emitted = false;
    brw->query.index++;
 }
 




More information about the mesa-commit mailing list