summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_builtin_builder.h
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2018-04-17 11:39:48 +0200
committerIago Toral Quiroga <[email protected]>2019-01-02 07:54:05 +0100
commit95b7c29c2c36f0f7eec363224ce1ad7b114522f1 (patch)
tree2d28942e3a37aa27cf8a90dc41651395b009d9b7 /src/compiler/nir/nir_builtin_builder.h
parentaeee68378083ed02b8e2e0e538ee50eb2fcc9d38 (diff)
compiler/spirv: handle 16-bit float in radians() and degrees()
v2: - use nir_imm_fmul helper (Jason) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_builtin_builder.h')
-rw-r--r--src/compiler/nir/nir_builtin_builder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_builtin_builder.h b/src/compiler/nir/nir_builtin_builder.h
index 0e5b9db462a..d1435b37fd4 100644
--- a/src/compiler/nir/nir_builtin_builder.h
+++ b/src/compiler/nir/nir_builtin_builder.h
@@ -60,7 +60,7 @@ nir_uclamp(nir_builder *b,
static inline nir_ssa_def *
nir_degrees(nir_builder *b, nir_ssa_def *val)
{
- return nir_fmul(b, val, nir_imm_float(b, 57.2957795131));
+ return nir_fmul_imm(b, val, 57.2957795131);
}
static inline nir_ssa_def *
@@ -78,7 +78,7 @@ nir_fast_normalize(nir_builder *b, nir_ssa_def *vec)
static inline nir_ssa_def *
nir_radians(nir_builder *b, nir_ssa_def *val)
{
- return nir_fmul(b, val, nir_imm_float(b, 0.01745329251));
+ return nir_fmul_imm(b, val, 0.01745329251);
}
#endif /* NIR_BUILTIN_BUILDER_H */