diff options
author | Eric Anholt <[email protected]> | 2010-10-11 13:56:29 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-11 15:26:59 -0700 |
commit | 17306c60ad61f5096010d210f5d3f6d0b3a99dad (patch) | |
tree | b9ef408f7e932a8c3c2db366a63aa209218c4d27 /src/mesa/drivers | |
parent | 720ed3c906b0f6d5822fe9fa442294c9828e1560 (diff) |
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.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | 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 8ac979dceaa..e2bff1386b8 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); |