nir: add nir_imm_ivec3 builder

the other ones exist, so why not this one too

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11983>
This commit is contained in:
Mike Blumenkrantz
2021-07-20 12:07:48 -04:00
committed by Marge Bot
parent 1d8e9430d2
commit 3ab74d0ffa
+12
View File
@@ -408,6 +408,18 @@ nir_imm_ivec2(nir_builder *build, int x, int y)
return nir_build_imm(build, 2, 32, v);
}
static inline nir_ssa_def *
nir_imm_ivec3(nir_builder *build, int x, int y, int z)
{
nir_const_value v[3] = {
nir_const_value_for_int(x, 32),
nir_const_value_for_int(y, 32),
nir_const_value_for_int(z, 32),
};
return nir_build_imm(build, 3, 32, v);
}
static inline nir_ssa_def *
nir_imm_ivec4(nir_builder *build, int x, int y, int z, int w)
{