[Mesa-dev] [PATCH 2/2] i965: Don't treat HW_REGs as barriers if they're immediates.
Matt Turner
mattst88 at gmail.com
Thu Apr 17 16:04:39 PDT 2014
We had a handful of cases where we'd used brw_imm_*() to generate an
immediate, rather than fs_reg(). We shouldn't do that but we shouldn't
limit scheduling flexibility on account of immediate arguments either.
---
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index 8cc6908..bb0461c 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -807,7 +807,9 @@ fs_instruction_scheduler::calculate_deps()
add_dep(last_accumulator_write, n);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM) {
+ inst->src[i].file != UNIFORM &&
+ (inst->src[i].file != HW_REG ||
+ inst->src[i].fixed_hw_reg.file != IMM)) {
assert(inst->src[i].file != MRF);
add_barrier_deps(n);
}
@@ -937,7 +939,9 @@ fs_instruction_scheduler::calculate_deps()
add_dep(n, last_accumulator_write);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM) {
+ inst->src[i].file != UNIFORM &&
+ (inst->src[i].file != HW_REG ||
+ inst->src[i].fixed_hw_reg.file != IMM)) {
assert(inst->src[i].file != MRF);
add_barrier_deps(n);
}
@@ -1072,7 +1076,9 @@ vec4_instruction_scheduler::calculate_deps()
add_dep(last_accumulator_write, n);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM) {
+ inst->src[i].file != UNIFORM &&
+ (inst->src[i].file != HW_REG ||
+ inst->src[i].fixed_hw_reg.file != IMM)) {
/* No reads from MRF, and ATTR is already translated away */
assert(inst->src[i].file != MRF &&
inst->src[i].file != ATTR);
@@ -1169,7 +1175,9 @@ vec4_instruction_scheduler::calculate_deps()
add_dep(n, last_accumulator_write);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM) {
+ inst->src[i].file != UNIFORM &&
+ (inst->src[i].file != HW_REG ||
+ inst->src[i].fixed_hw_reg.file != IMM)) {
assert(inst->src[i].file != MRF &&
inst->src[i].file != ATTR);
add_barrier_deps(n);
--
1.8.3.2
More information about the mesa-dev
mailing list