i965: Set the render target index in gen6 fixed-function/ARB_fp path.
authorEric Anholt <eric@anholt.net>
Wed, 8 Dec 2010 18:17:24 +0000 (10:17 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 8 Dec 2010 18:51:04 +0000 (10:51 -0800)
Fixes:
fbo-drawbuffers2-blend
fbo-drawbuffers2-colormask

src/mesa/drivers/dri/i965/brw_wm_emit.c

index 24e10632aa0aad89510b54e23426627fa8cf56a8..9822b2cf055507c25d6b7b7daad53c17d45fd119 100644 (file)
@@ -1529,6 +1529,13 @@ void emit_fb_write(struct brw_wm_compile *c,
       brw_set_mask_control(p, BRW_MASK_DISABLE);
       brw_MOV(p, brw_message_reg(0), brw_vec8_grf(0, 0));
       brw_pop_insn_state(p);
+
+      if (target != 0) {
+        brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE,
+                                       0,
+                                       2), BRW_REGISTER_TYPE_UD),
+                brw_imm_ud(target));
+      }
    }
 
    if (!c->runtime_check_aads_emit) {