summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-02-28 11:23:04 +0000
committerDave Airlie <[email protected]>2012-02-28 15:52:36 +0000
commit2a76609681648e4868c6154d7ea04d42e07f6f10 (patch)
treef92314d0768bc63ee3a6a5215c028daecc5220d6 /src/gallium
parent9773370eda1765b1014ba11a699d10244b88757c (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_arit.c3
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 60018447e02..4cc421d6215 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)