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:
f18554e
)
compiler/spirv: implement 16-bit exp and log
author
Iago Toral Quiroga
<itoral@igalia.com>
Wed, 18 Apr 2018 08:09:33 +0000
(10:09 +0200)
committer
Iago Toral Quiroga
<itoral@igalia.com>
Wed, 2 Jan 2019 06:54:05 +0000
(07:54 +0100)
v2
- use nir_fmul_imm helper (Jason)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/vtn_glsl450.c
patch
|
blob
|
history
diff --git
a/src/compiler/spirv/vtn_glsl450.c
b/src/compiler/spirv/vtn_glsl450.c
index
7e81369
..
7984c7c
100644
(file)
--- a/
src/compiler/spirv/vtn_glsl450.c
+++ b/
src/compiler/spirv/vtn_glsl450.c
@@
-177,7
+177,7
@@
matrix_inverse(struct vtn_builder *b, struct vtn_ssa_value *src)
static nir_ssa_def *
build_exp(nir_builder *b, nir_ssa_def *x)
{
- return nir_fexp2(b, nir_fmul
(b, x, nir_imm_float(b, M_LOG2E)
));
+ return nir_fexp2(b, nir_fmul
_imm(b, x, M_LOG2E
));
}
/**
@@
-186,7
+186,7
@@
build_exp(nir_builder *b, nir_ssa_def *x)
static nir_ssa_def *
build_log(nir_builder *b, nir_ssa_def *x)
{
- return nir_fmul
(b, nir_flog2(b, x), nir_imm_float(b, 1.0 / M_LOG2E)
);
+ return nir_fmul
_imm(b, nir_flog2(b, x), 1.0 / M_LOG2E
);
}
/**