i965/vs: add vec4_instruction::depends_on_flags
authorChris Forbes <chrisf@ijw.co.nz>
Thu, 15 Aug 2013 18:54:30 +0000 (06:54 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 15 Aug 2013 19:21:43 +0000 (07:21 +1200)
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@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
src/mesa/drivers/dri/i965/brw_vec4.h

index 37e7db5f22efe37ea77579a1cd492db3eef405ef..5530683df84f1dd8cf79e34fa98bdfd984952eb0 100644 (file)
@@ -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);
       }
 
index 18e0d567a74400bf932d55a412b9f127879b00bf..ee14cd82600f907337ccfe086c7533359c8c3c82 100644 (file)
@@ -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;
+   }
 };
 
 /**