projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6790b3a
)
ac/nir: make ac_build_fdiv support 16-bit floats
author
Rhys Perry
<pendingchaos02@gmail.com>
Thu, 6 Dec 2018 14:22:17 +0000
(14:22 +0000)
committer
Rhys Perry
<pendingchaos02@gmail.com>
Tue, 19 Feb 2019 11:04:29 +0000
(11:04 +0000)
v2: don't use ac_get_onef()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_llvm_build.c
patch
|
blob
|
history
diff --git
a/src/amd/common/ac_llvm_build.c
b/src/amd/common/ac_llvm_build.c
index
f033fde
..
c6bc507
100644
(file)
--- a/
src/amd/common/ac_llvm_build.c
+++ b/
src/amd/common/ac_llvm_build.c
@@
-620,7
+620,7
@@
ac_build_fdiv(struct ac_llvm_context *ctx,
* If we do (num * (1 / den)), LLVM does:
* return num * v_rcp_f32(den);
*/
- LLVMValueRef one = LLVM
TypeOf(num) == ctx->f64 ? ctx->f64_1 : ctx->f32_1
;
+ LLVMValueRef one = LLVM
ConstReal(LLVMTypeOf(num), 1.0)
;
LLVMValueRef rcp = LLVMBuildFDiv(ctx->builder, one, den, "");
LLVMValueRef ret = LLVMBuildFMul(ctx->builder, num, rcp, "");