i965: Emit extra 0's in 3DSTATE_MULTISAMPLE on Ivybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 9 Apr 2011 07:53:46 +0000 (00:53 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:33:00 +0000 (23:33 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_misc_state.c

index ed6a09d..cb2814b 100644 (file)
@@ -476,12 +476,15 @@ static void upload_invarient_state( struct brw_context *brw )
 
    if (intel->gen >= 6) {
       int i;
+      int len = intel->gen >= 7 ? 4 : 3;
 
-      BEGIN_BATCH(3);
-      OUT_BATCH(_3DSTATE_MULTISAMPLE << 16 | (3 - 2));
+      BEGIN_BATCH(len);
+      OUT_BATCH(_3DSTATE_MULTISAMPLE << 16 | (len - 2));
       OUT_BATCH(MS_PIXEL_LOCATION_CENTER |
                MS_NUMSAMPLES_1);
       OUT_BATCH(0); /* positions for 4/8-sample */
+      if (intel->gen >= 7)
+        OUT_BATCH(0);
       ADVANCE_BATCH();
 
       BEGIN_BATCH(2);