i965: Set the state base address on Sandybridge.
authorEric Anholt <eric@anholt.net>
Mon, 14 Dec 2009 22:11:14 +0000 (14:11 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 25 Feb 2010 18:53:07 +0000 (10:53 -0800)
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_state_upload.c

index 7d9e793ff2fa12466f801583efbcc52802b2fa23..c36a287d810dd3561f50a749e4021cf8befbc27e 100644 (file)
@@ -559,7 +559,20 @@ static void upload_state_base_address( struct brw_context *brw )
    /* Output the structure (brw_state_base_address) directly to the
     * batchbuffer, so we can emit relocations inline.
     */
-   if (intel->is_ironlake) {
+   if (intel->gen >= 6) {
+       BEGIN_BATCH(10);
+       OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (10 - 2));
+       OUT_BATCH(1); /* General state base address */
+       OUT_BATCH(1); /* Surface state base address */
+       OUT_BATCH(1); /* Dynamic state base address */
+       OUT_BATCH(1); /* Indirect object base address */
+       OUT_BATCH(1); /* Instruction base address */
+       OUT_BATCH(1); /* General state upper bound */
+       OUT_BATCH(1); /* Dynamic state upper bound */
+       OUT_BATCH(1); /* Indirect object upper bound */
+       OUT_BATCH(1); /* Instruction access upper bound */
+       ADVANCE_BATCH();
+   } else if (intel->is_ironlake) {
        BEGIN_BATCH(8);
        OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (8 - 2));
        OUT_BATCH(1); /* General state base address */
index 30386ef316a3c4f7e4ded53ada18ff39822c7a89..30a36956e24ec6967ed800679e6536ad21a047d6 100644 (file)
@@ -145,8 +145,11 @@ const struct brw_tracked_state *gen6_atoms[] =
    /* Command packets:
     */
    &brw_invarient_state,
+#endif
+
    &brw_state_base_address,
 
+#if 0
    &brw_binding_table_pointers,
    &brw_blend_constant_color,
 #endif