i965/fs: Add missing register allocation for 3rd sources.
authorEric Anholt <eric@anholt.net>
Tue, 7 Feb 2012 00:09:59 +0000 (01:09 +0100)
committerEric Anholt <eric@anholt.net>
Sat, 11 Feb 2012 01:08:04 +0000 (17:08 -0800)
Our only instruction with a 3rd source so far was linterp, and that
value was never register-allocated.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp

index 0d1712e9d5a55e6cade6c48d000cd1e78573ca94..45f83f3dbcb57b9b8c9aedbded22e6e2ec165099 100644 (file)
@@ -61,6 +61,7 @@ fs_visitor::assign_regs_trivial()
       assign_reg(hw_reg_mapping, &inst->dst, reg_width);
       assign_reg(hw_reg_mapping, &inst->src[0], reg_width);
       assign_reg(hw_reg_mapping, &inst->src[1], reg_width);
+      assign_reg(hw_reg_mapping, &inst->src[2], reg_width);
    }
 
    if (this->grf_used >= max_grf) {
@@ -271,6 +272,7 @@ fs_visitor::assign_regs()
       assign_reg(hw_reg_mapping, &inst->dst, reg_width);
       assign_reg(hw_reg_mapping, &inst->src[0], reg_width);
       assign_reg(hw_reg_mapping, &inst->src[1], reg_width);
+      assign_reg(hw_reg_mapping, &inst->src[2], reg_width);
    }
 
    ralloc_free(g);