965: Fix partially transparent textures in Doom 3 engine games
authorPawel Pieczul <Pawel.Pieczul@intel.com>
Wed, 23 Jul 2008 22:43:23 +0000 (15:43 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 23 Jul 2008 22:43:23 +0000 (15:43 -0700)
Numbers of destination depth registers corrected (destination stencil
register was sent as depth register).

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

index ba9168b6efc451ec882eb7e1cf64eaa60a7e0cd1..9b919b9cfed32941703b17cc5fa40288dca182df 100644 (file)
@@ -948,15 +948,16 @@ static void emit_fb_write( struct brw_wm_compile *c,
       GLuint off = c->key.dest_depth_reg % 2;
 
       if (off != 0) {
-        brw_push_insn_state(p);
-        brw_set_compression_control(p, BRW_COMPRESSION_NONE);
-        brw_MOV(p, brw_message_reg(nr), arg1[comp]);
-        /* 2nd half? */
-        brw_MOV(p, brw_message_reg(nr+1), offset(arg1[comp],1));
-        brw_pop_insn_state(p);
+         brw_push_insn_state(p);
+         brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+
+         brw_MOV(p, brw_message_reg(nr), offset(arg1[comp],1));
+         /* 2nd half? */
+         brw_MOV(p, brw_message_reg(nr+1), arg1[comp+1]);
+         brw_pop_insn_state(p);
       }
       else {
-        brw_MOV(p, brw_message_reg(nr), arg1[comp]);
+         brw_MOV(p, brw_message_reg(nr), arg1[comp]);
       }
       nr += 2;
    }