On ILK implicit accumulator write from MUL opcode seem to
behave sometime unexpected. This patch change implicit
accumulator write to explicit on emitting LRP for gen<6.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77707
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77703
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
---
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index d2dc5fa..c09f0a7 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -226,8 +226,10 @@ fs_visitor::emit_lrp(const fs_reg &dst, const fs_reg &x, 
const fs_reg &y,
       fs_reg negative_a = a;
       negative_a.negate = !a.negate;
 
+      struct brw_reg acc = retype(brw_acc_reg(), this->result.type);
+
       emit(ADD(one_minus_a, negative_a, fs_reg(1.0f)));
-      fs_inst *mul = emit(MUL(reg_null_f, y, a));
+      fs_inst *mul = emit(MUL(acc, y, a));
       mul->writes_accumulator = true;
       emit(MAC(dst, x, one_minus_a));
    } else {
-- 
1.8.1.2

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to