nir/builder: add nir_imm_double()
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:

committed by
Samuel Iglesias Gonsálvez

parent
3a150683ce
commit
2cf3b28884
@@ -114,6 +114,14 @@ nir_imm_float(nir_builder *build, float x)
|
|||||||
return nir_build_imm(build, 1, 32, v);
|
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 *
|
static inline nir_ssa_def *
|
||||||
nir_imm_vec4(nir_builder *build, float x, float y, float z, float w)
|
nir_imm_vec4(nir_builder *build, float x, float y, float z, float w)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user