Mesa (master): i965: Don't leak the IR annotation into later instructions.

Eric Anholt anholt at kemper.freedesktop.org
Mon Dec 3 22:25:15 UTC 2012


Module: Mesa
Branch: master
Commit: 0f06864ba566eaff5b739a9d0fba5ed7eaadd60b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f06864ba566eaff5b739a9d0fba5ed7eaadd60b

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Nov 29 16:51:13 2012 -0800

i965: Don't leak the IR annotation into later instructions.

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 at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp   |    1 +
 src/mesa/drivers/dri/i965/brw_vec4.cpp |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ee3b7fd..b777172 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2158,6 +2158,7 @@ fs_visitor::run()
       } else {
          emit_fragment_program_code();
       }
+      base_ir = NULL;
       if (failed)
 	 return false;
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 34c34d7..1a199d6 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -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();




More information about the mesa-commit mailing list