Mesa (master): i965/vs: Enable workaround-free math on gen7.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Jan 23 21:06:42 UTC 2012
Module: Mesa
Branch: master
Commit: 3353626a6a2cc20301c65f3f6c1c5beb80721181
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3353626a6a2cc20301c65f3f6c1c5beb80721181
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 18 14:42:26 2012 -0800
i965/vs: Enable workaround-free math on gen7.
This is similar to a commit that did the same for the FS.
Shaves several more instructions off of the VS in Lightsmark, but no
statistically significant performance difference (n=5).
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 2436bc9..898e78d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -313,7 +313,9 @@ vec4_visitor::emit_math(opcode opcode, dst_reg dst, src_reg src)
return;
}
- if (intel->gen >= 6) {
+ if (intel->gen >= 7) {
+ emit(opcode, dst, src);
+ } else if (intel->gen == 6) {
return emit_math1_gen6(opcode, dst, src);
} else {
return emit_math1_gen4(opcode, dst, src);
@@ -380,7 +382,9 @@ vec4_visitor::emit_math(enum opcode opcode,
return;
}
- if (intel->gen >= 6) {
+ if (intel->gen >= 7) {
+ emit(opcode, dst, src0, src1);
+ } else if (intel->gen == 6) {
return emit_math2_gen6(opcode, dst, src0, src1);
} else {
return emit_math2_gen4(opcode, dst, src0, src1);
More information about the mesa-commit
mailing list