Mesa (master): i965: Don't compute-to-MRF in gen6 VS math.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Oct 11 22:36:17 UTC 2010
Module: Mesa
Branch: master
Commit: 17306c60ad61f5096010d210f5d3f6d0b3a99dad
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=17306c60ad61f5096010d210f5d3f6d0b3a99dad
Author: Eric Anholt <eric at anholt.net>
Date: Mon Oct 11 13:56:29 2010 -0700
i965: Don't compute-to-MRF in gen6 VS math.
There was code to do this for pre-gen6 already, this just enables it
for gen6 as well.
---
src/mesa/drivers/dri/i965/brw_vs_emit.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 8ac979d..e2bff13 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -593,11 +593,15 @@ static void emit_math1( struct brw_vs_compile *c,
struct brw_compile *p = &c->func;
struct intel_context *intel = &p->brw->intel;
struct brw_reg tmp = dst;
- GLboolean need_tmp = (intel->gen < 6 &&
- (dst.dw1.bits.writemask != 0xf ||
- dst.file != BRW_GENERAL_REGISTER_FILE));
+ GLboolean need_tmp = GL_FALSE;
- if (need_tmp)
+ if (dst.file != BRW_GENERAL_REGISTER_FILE)
+ need_tmp = GL_TRUE;
+
+ if (intel->gen < 6 && dst.dw1.bits.writemask != 0xf)
+ need_tmp = GL_TRUE;
+
+ if (need_tmp)
tmp = get_tmp(c);
brw_math(p,
@@ -626,9 +630,13 @@ static void emit_math2( struct brw_vs_compile *c,
struct brw_compile *p = &c->func;
struct intel_context *intel = &p->brw->intel;
struct brw_reg tmp = dst;
- GLboolean need_tmp = (intel->gen < 6 &&
- (dst.dw1.bits.writemask != 0xf ||
- dst.file != BRW_GENERAL_REGISTER_FILE));
+ GLboolean need_tmp = GL_FALSE;
+
+ if (dst.file != BRW_GENERAL_REGISTER_FILE)
+ need_tmp = GL_TRUE;
+
+ if (intel->gen < 6 && dst.dw1.bits.writemask != 0xf)
+ need_tmp = GL_TRUE;
if (need_tmp)
tmp = get_tmp(c);
More information about the mesa-commit
mailing list