This starts coming up with the array indexing math I'm about to add. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 9851ad4..796a361 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1429,8 +1429,11 @@ fs_visitor::opt_algebraic() continue; /* a + 0.0 = a */ - if (inst->src[1].type == BRW_REGISTER_TYPE_F && - inst->src[1].imm.f == 0.0) { + if ((inst->src[1].type == BRW_REGISTER_TYPE_F && + inst->src[1].imm.f == 0.0) || + ((inst->src[1].type == BRW_REGISTER_TYPE_D || + inst->src[1].type == BRW_REGISTER_TYPE_UD) && + inst->src[1].imm.u == 0)) { inst->opcode = BRW_OPCODE_MOV; inst->src[1] = reg_undef; progress = true; -- 1.7.10.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev