i965: Don't leak the IR annotation into later instructions.
authorEric Anholt <eric@anholt.net>
Fri, 30 Nov 2012 00:51:13 +0000 (16:51 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 3 Dec 2012 21:19:46 +0000 (13:19 -0800)
After walking our IR instructions (Mesa or GLSL), we don't want to also
mark the start of the FB/URB writes or whatever as being that IR.  This
can end up being misleading when the end of the IR visit got copy
propagated out to a later instruction in the URB writes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4.cpp

index ee3b7fd9be668365220f8714feffcd8ce0962e33..b777172c239bf259ac9bcd7fb4ea7cbe05e19599 100644 (file)
@@ -2158,6 +2158,7 @@ fs_visitor::run()
       } else {
          emit_fragment_program_code();
       }
+      base_ir = NULL;
       if (failed)
         return false;
 
index 34c34d79399de11b5671fb572144dcd498ed28e6..1a199d6e822de448e7174b853259a69a006b04c0 100644 (file)
@@ -1052,6 +1052,7 @@ vec4_visitor::run()
    } else {
       emit_vertex_program_code();
    }
+   base_ir = NULL;
 
    if (c->key.userclip_active && !c->key.uses_clip_distance)
       setup_uniform_clipplane_values();