mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
nir: add imm_vec3 to round these out
Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12253>
This commit is contained in:
parent
02b6015945
commit
ec66c58138
1 changed files with 11 additions and 0 deletions
|
|
@ -352,6 +352,17 @@ nir_imm_vec2(nir_builder *build, float x, float y)
|
|||
return nir_build_imm(build, 2, 32, v);
|
||||
}
|
||||
|
||||
static inline nir_ssa_def *
|
||||
nir_imm_vec3(nir_builder *build, float x, float y, float z)
|
||||
{
|
||||
nir_const_value v[3] = {
|
||||
nir_const_value_for_float(x, 32),
|
||||
nir_const_value_for_float(y, 32),
|
||||
nir_const_value_for_float(z, 32),
|
||||
};
|
||||
return nir_build_imm(build, 3, 32, v);
|
||||
}
|
||||
|
||||
static inline nir_ssa_def *
|
||||
nir_imm_vec4(nir_builder *build, float x, float y, float z, float w)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue