i965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 30 Jun 2011 07:00:36 +0000 (00:00 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jul 2011 20:31:41 +0000 (13:31 -0700)
This is a little different from most because it's a single DWord;
there's no length field.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_structs.h

index 6e2620ae9f92769cb92ab1ece2c557d9d4eadf11..a2ee7a592e21092c0749dc7b3dd1828dc3956e1b 100644 (file)
@@ -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 = {
index 1b9644f4776f378611249827505c82ffdd389dfd..d40f8f7a5cccb3029779f41cabdc251037050f03 100644 (file)
@@ -95,14 +95,6 @@ struct brw_mi_flush
    GLuint opcode:16;
 };
 
-struct brw_vf_statistics
-{
-   GLuint statistics_enable:1;
-   GLuint pad:15;
-   GLuint opcode:16;
-};
-
-
 
 struct brw_binding_table_pointers
 {