Mesa (master): i965/fs: Don't fix_math_operand() on Gen >= 8.
Matt Turner
mattst88 at kemper.freedesktop.org
Tue Jun 24 18:55:40 UTC 2014
Module: Mesa
Branch: master
Commit: 48f1143c64e46b3d11dc318d7825b6167a2b78e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=48f1143c64e46b3d11dc318d7825b6167a2b78e5
Author: Matt Turner <mattst88 at gmail.com>
Date: Mon Jun 23 13:30:15 2014 -0700
i965/fs: Don't fix_math_operand() on Gen >= 8.
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index d7b969e..185a1f6 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1386,7 +1386,7 @@ fs_visitor::emit_math(enum opcode opcode, fs_reg dst, fs_reg src)
* Gen 6 hardware ignores source modifiers (negate and abs) on math
* instructions, so we also move to a temp to set those up.
*/
- if (brw->gen >= 6)
+ if (brw->gen == 6 || brw->gen == 7)
src = fix_math_operand(src);
fs_inst *inst = emit(opcode, dst, src);
@@ -1418,7 +1418,9 @@ fs_visitor::emit_math(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1)
return NULL;
}
- if (brw->gen >= 6) {
+ if (brw->gen >= 8) {
+ inst = emit(opcode, dst, src0, src1);
+ } else if (brw->gen >= 6) {
src0 = fix_math_operand(src0);
src1 = fix_math_operand(src1);
More information about the mesa-commit
mailing list