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_quad.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_quad.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_quad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_quad.c b/src/gallium/auxiliary/gallivm/lp_bld_quad.c index ca36046..7b10889 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_quad.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_quad.c @@ -85,7 +85,7 @@ lp_build_scalar_ddx(struct lp_build_context *bld, LLVMValueRef idx_right = LLVMConstInt(LLVMInt32Type(), LP_BLD_QUAD_TOP_RIGHT, 0); LLVMValueRef a_left = LLVMBuildExtractElement(bld->builder, a, idx_left, ""); LLVMValueRef a_right = LLVMBuildExtractElement(bld->builder, a, idx_right, ""); - return LLVMBuildSub(bld->builder, a_right, a_left, ""); + return lp_build_sub(bld, a_right, a_left); } @@ -97,5 +97,5 @@ lp_build_scalar_ddy(struct lp_build_context *bld, LLVMValueRef idx_bottom = LLVMConstInt(LLVMInt32Type(), LP_BLD_QUAD_BOTTOM_LEFT, 0); LLVMValueRef a_top = LLVMBuildExtractElement(bld->builder, a, idx_top, ""); LLVMValueRef a_bottom = LLVMBuildExtractElement(bld->builder, a, idx_bottom, ""); - return LLVMBuildSub(bld->builder, a_bottom, a_top, ""); + return lp_build_sub(bld, a_bottom, a_top); } |