Mesa (master): i965/vs: add vec4_instruction::depends_on_flags

Chris Forbes chrisf at kemper.freedesktop.org
Thu Aug 15 10:23:55 UTC 2013


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

Author: Chris Forbes <chrisf at ijw.co.nz>
Date:   Fri Aug 16 06:54:30 2013 +1200

i965/vs: add vec4_instruction::depends_on_flags

We're about to have an instruction that depends on the flags but isn't
predicated. This lays the groundwork.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>

---

 .../drivers/dri/i965/brw_schedule_instructions.cpp |    4 ++--
 src/mesa/drivers/dri/i965/brw_vec4.h               |    5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index 37e7db5..5530683 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -821,7 +821,7 @@ vec4_instruction_scheduler::calculate_deps()
          add_dep(last_mrf_write[inst->base_mrf + i], n);
       }
 
-      if (inst->predicate) {
+      if (inst->depends_on_flags()) {
          assert(last_conditional_mod);
          add_dep(last_conditional_mod, n);
       }
@@ -892,7 +892,7 @@ vec4_instruction_scheduler::calculate_deps()
          add_dep(n, last_mrf_write[inst->base_mrf + i], 2);
       }
 
-      if (inst->predicate) {
+      if (inst->depends_on_flags()) {
          add_dep(n, last_conditional_mod);
       }
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 18e0d56..ee14cd8 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -185,6 +185,11 @@ public:
    bool is_send_from_grf();
    bool can_reswizzle_dst(int dst_writemask, int swizzle, int swizzle_mask);
    void reswizzle_dst(int dst_writemask, int swizzle);
+
+   bool depends_on_flags()
+   {
+      return predicate;
+   }
 };
 
 /**




More information about the mesa-commit mailing list