i965/vec4: Add and use vec4_instruction::writes_flag().

To be consistent with the fs backend. Also the instruction scheduler
incorrectly considered SEL with a conditional modifier to read the flag
register.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner
2014-03-12 00:14:07 -07:00
parent b0d3205c2a
commit de4692f56c
2 changed files with 7 additions and 2 deletions
@@ -1060,7 +1060,7 @@ vec4_instruction_scheduler::calculate_deps()
}
}
if (inst->conditional_mod) {
if (inst->writes_flag()) {
add_dep(last_conditional_mod, n, 0);
last_conditional_mod = n;
}
@@ -1129,7 +1129,7 @@ vec4_instruction_scheduler::calculate_deps()
}
}
if (inst->conditional_mod) {
if (inst->writes_flag()) {
last_conditional_mod = n;
}
}
+5
View File
@@ -271,6 +271,11 @@ public:
{
return predicate || opcode == VS_OPCODE_UNPACK_FLAGS_SIMD4X2;
}
bool writes_flag()
{
return conditional_mod && opcode != BRW_OPCODE_SEL;
}
};
/**