i965: Convert system instruction pointer to OUT_BATCH style.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 30 Jun 2011 07:11:39 +0000 (00:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jul 2011 20:31:41 +0000 (13:31 -0700)
Also rename it from CMD_STATE_INSN_POINTER to CMD_STATE_SIP to match the
documentation.

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

index 6d41b1e69d3efa72a1d9b34f5b33d4c3ad26edb4..a75171da316567708e1e1cf6e21483699b21b317 100644 (file)
 #define CMD_CONST_BUFFER              0x6002
 
 #define CMD_STATE_BASE_ADDRESS        0x6101
-#define CMD_STATE_INSN_POINTER        0x6102
+#define CMD_STATE_SIP                 0x6102
 #define CMD_PIPELINE_SELECT_965       0x6104
 #define CMD_PIPELINE_SELECT_GM45      0x6904
 
index fcbd97b44c80465381a7f16c41096b5ad8554245..bc8ef783ef56ad9bef2da653719796bbafb0caa1 100644 (file)
@@ -652,19 +652,10 @@ static void upload_invarient_state( struct brw_context *brw )
       }
    }
 
-   /* 0x61020000  State Instruction Pointer */
-   {
-      struct brw_system_instruction_pointer sip;
-      memset(&sip, 0, sizeof(sip));
-
-      sip.header.opcode = CMD_STATE_INSN_POINTER;
-      sip.header.length = 0;
-      sip.bits0.pad = 0;
-      sip.bits0.system_instruction_pointer = 0;
-
-      BRW_BATCH_STRUCT(brw, &sip);
-   }
-
+   BEGIN_BATCH(2);
+   OUT_BATCH(CMD_STATE_SIP << 16 | (2 - 2));
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
 
    BEGIN_BATCH(1);
    OUT_BATCH(brw->CMD_VF_STATISTICS << 16 |