From 3ab74d0ffa3bb14ef6971d8e9d94514e0ff2671a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 20 Jul 2021 12:07:48 -0400 Subject: [PATCH] nir: add nir_imm_ivec3 builder the other ones exist, so why not this one too Reviewed-by: Jason Ekstrand Reviewed-by: Rob Clark Part-of: --- src/compiler/nir/nir_builder.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 2551da45f9f..48ba1bcdfdb 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -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) {