[Mesa-dev] [PATCH 2/5] i965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.

Kenneth Graunke kenneth at whitecape.org
Thu Jul 7 00:49:14 PDT 2011


This is a little different from most because it's a single DWord;
there's no length field.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_misc_state.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 5ecbe64..fba292d 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -672,16 +672,10 @@ static void upload_invarient_state( struct brw_context *brw )
    }
 
 
-   {
-      struct brw_vf_statistics vfs;
-      memset(&vfs, 0, sizeof(vfs));
-
-      vfs.opcode = brw->CMD_VF_STATISTICS;
-      if (unlikely(INTEL_DEBUG & DEBUG_STATS))
-	 vfs.statistics_enable = 1; 
-
-      BRW_BATCH_STRUCT(brw, &vfs);
-   }
+   BEGIN_BATCH(1);
+   OUT_BATCH(brw->CMD_VF_STATISTICS << 16 |
+	     (unlikely(INTEL_DEBUG & DEBUG_STATS) ? 1 : 0));
+   ADVANCE_BATCH();
 }
 
 const struct brw_tracked_state brw_invarient_state = {
-- 
1.7.5.2



More information about the mesa-dev mailing list