summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-12-14 14:11:14 -0800
committerEric Anholt <[email protected]>2010-02-25 10:53:07 -0800
commita38096aa94ef62dba73792f1680098059b697662 (patch)
tree0742324eafd994fca8c30ee7d3eeef74809a91f3 /src/mesa
parent2c3d6f8e3e714451c436d5496167747e9311c3df (diff)
i965: Set the state base address on Sandybridge.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c15
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c3
2 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 7d9e793ff2f..c36a287d810 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -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 */
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 30386ef316a..30a36956e24 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -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