[Mesa-dev] [PATCH 2/3] i965/fs: Add missing register allocation for 3rd sources.

Eric Anholt eric at anholt.net
Tue Feb 7 21:52:36 PST 2012


Our only instruction with a 3rd source so far was linterp, and that
value was never register-allocated.
---
 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index 0d1712e..45f83f3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -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);
-- 
1.7.9



More information about the mesa-dev mailing list