From: Connor Abbott Date: Fri, 31 Jul 2015 17:52:04 +0000 (-0700) Subject: nir/builder: add nir_imm_double() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2cf3b28884047f1cdef76542355bd2a4dd653fde;p=mesa.git nir/builder: add nir_imm_double() Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 3e3bdcd3b8d..a14f9ef70d3 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -114,6 +114,14 @@ nir_imm_float(nir_builder *build, float x) return nir_build_imm(build, 1, 32, v); } +static inline nir_ssa_def * +nir_imm_double(nir_builder *build, double x) +{ + nir_const_value v = { { .f64 = {x, 0, 0, 0} } }; + nir_ssa_def *def = nir_build_imm(build, 1, 64, v); + return def; +} + static inline nir_ssa_def * nir_imm_vec4(nir_builder *build, float x, float y, float z, float w) {