diff options
author | Iago Toral Quiroga <[email protected]> | 2018-04-18 10:09:33 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2019-01-02 07:54:05 +0100 |
commit | 88663ba67c3438d7bac003fc6060a602f5189c39 (patch) | |
tree | bb12fb438460fab0a141ef737cae6be68464ab01 /src | |
parent | f18554e2ce570c2c560cc7db4a7511b814a1a7e7 (diff) |
compiler/spirv: implement 16-bit exp and log
v2
- use nir_fmul_imm helper (Jason)
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/spirv/vtn_glsl450.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_glsl450.c b/src/compiler/spirv/vtn_glsl450.c index 7e813695a85..7984c7cc776 100644 --- 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); } /** |