Mesa (master): gallivm: only do rcp/mul for floating
Dave Airlie
airlied at kemper.freedesktop.org
Tue Feb 28 20:23:50 UTC 2012
Module: Mesa
Branch: master
Commit: 2a76609681648e4868c6154d7ea04d42e07f6f10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a76609681648e4868c6154d7ea04d42e07f6f10
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Feb 28 11:23:04 2012 +0000
gallivm: only do rcp/mul for floating
rcp asserts on type.floating so don't go passing non-floating
things into it.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/auxiliary/gallivm/lp_bld_arit.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 6001844..4cc421d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -612,7 +612,8 @@ lp_build_div(struct lp_build_context *bld,
return LLVMConstUDiv(a, b);
}
- if(util_cpu_caps.has_sse && type.width == 32 && type.length == 4)
+ if(util_cpu_caps.has_sse && type.width == 32 && type.length == 4 &&
+ type.floating)
return lp_build_mul(bld, a, lp_build_rcp(bld, b));
if (type.floating)
More information about the mesa-commit
mailing list