diff options
author | Matt Turner <[email protected]> | 2014-03-17 10:39:43 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-06-01 13:29:24 -0700 |
commit | b1dcdcde2e323f960833f5c7da65d5c2c20113c9 (patch) | |
tree | 6852fd268a2aa5ad096322a9f624879bc6293bd2 /src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | |
parent | 27e12a8ea933e2f978e0ce9286422e6025c7377d (diff) |
i965/fs: Loop from 0 to inst->sources, not 0 to 3.
Reviewed-by: Chris Forbes <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp index 42fc5e476b9..34b036f3212 100644 --- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp +++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp @@ -505,7 +505,7 @@ fs_instruction_scheduler::count_remaining_grf_uses(backend_instruction *be) if (inst->dst.file == GRF) remaining_grf_uses[inst->dst.reg]++; - for (int i = 0; i < 3; i++) { + for (int i = 0; i < inst->sources; i++) { if (inst->src[i].file != GRF) continue; @@ -526,7 +526,7 @@ fs_instruction_scheduler::update_register_pressure(backend_instruction *be) grf_active[inst->dst.reg] = true; } - for (int i = 0; i < 3; i++) { + for (int i = 0; i < inst->sources; i++) { if (inst->src[i].file == GRF) { remaining_grf_uses[inst->src[i].reg]--; grf_active[inst->src[i].reg] = true; @@ -547,7 +547,7 @@ fs_instruction_scheduler::get_register_pressure_benefit(backend_instruction *be) benefit -= v->virtual_grf_sizes[inst->dst.reg]; } - for (int i = 0; i < 3; i++) { + for (int i = 0; i < inst->sources; i++) { if (inst->src[i].file != GRF) continue; @@ -781,7 +781,7 @@ fs_instruction_scheduler::calculate_deps() add_barrier_deps(n); /* read-after-write deps. */ - for (int i = 0; i < 3; i++) { + for (int i = 0; i < inst->sources; i++) { if (inst->src[i].file == GRF) { if (post_reg_alloc) { for (int r = 0; r < reg_width * inst->regs_read(v, i); r++) @@ -905,7 +905,7 @@ fs_instruction_scheduler::calculate_deps() fs_inst *inst = (fs_inst *)n->inst; /* write-after-read deps. */ - for (int i = 0; i < 3; i++) { + for (int i = 0; i < inst->sources; i++) { if (inst->src[i].file == GRF) { if (post_reg_alloc) { for (int r = 0; r < reg_width * inst->regs_read(v, i); r++) |