diff options
author | nobled <nobled@dreamwidth.org> | 2010-08-08 19:44:54 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-08-09 17:31:18 +0100 |
commit | fc9a49b638c26801951c33a570178bbb2b67ec60 (patch) | |
tree | 3f9a08b0d0b4d33f4a45a99cad17ea62bb135f18 /src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | |
parent | 65b9747a54490dd56cd5cee4c2c1b9f51d35f133 (diff) | |
download | external_mesa3d-fc9a49b638c26801951c33a570178bbb2b67ec60.zip external_mesa3d-fc9a49b638c26801951c33a570178bbb2b67ec60.tar.gz external_mesa3d-fc9a49b638c26801951c33a570178bbb2b67ec60.tar.bz2 |
gallivm: Always use floating-point operators for floating-point types
This fixes the assert added in LLVM 2.8:
assert(getType()->isIntOrIntVectorTy() &&
"Tried to create an integer operation on a non-integer type!")
But it also fixes some subtle bugs, since we should've been doing this
since LLVM 2.6 anyway.
Includes a modified patch from steckdenis@yahoo.fr for the
FNeg instructions in emit_fetch(); thanks for pointing those out.
http://bugs.freedesktop.org/29404
http://bugs.freedesktop.org/29407
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_aos.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c index 0f01fc1..247cb83 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c @@ -240,7 +240,7 @@ lp_build_unpack_arith_rgba_aos(LLVMBuilderRef builder, */ if (normalized) - scaled = LLVMBuildMul(builder, casted, LLVMConstVector(scales, 4), ""); + scaled = LLVMBuildFMul(builder, casted, LLVMConstVector(scales, 4), ""); else scaled = casted; @@ -322,7 +322,7 @@ lp_build_pack_rgba_aos(LLVMBuilderRef builder, } if (normalized) - scaled = LLVMBuildMul(builder, unswizzled, LLVMConstVector(scales, 4), ""); + scaled = LLVMBuildFMul(builder, unswizzled, LLVMConstVector(scales, 4), ""); else scaled = unswizzled; |