Mesa (master): nir/builder: const'ify swiz param

Rob Clark robclark at kemper.freedesktop.org
Tue Apr 19 21:14:24 UTC 2016


Module: Mesa
Branch: master
Commit: eb00a0fc581c4040bc2e4640da4ff9f40c951ae8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb00a0fc581c4040bc2e4640da4ff9f40c951ae8

Author: Rob Clark <robclark at freedesktop.org>
Date:   Tue Apr 19 15:44:25 2016 -0400

nir/builder: const'ify swiz param

No need for it not to be const, and lets caller declare it const if
desired.

Signed-off-by: Rob Clark <robclark at freedesktop.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/compiler/nir/nir_builder.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 35d65b4..e4e0895 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -306,7 +306,7 @@ nir_imov_alu(nir_builder *build, nir_alu_src src, unsigned num_components)
  * Construct an fmov or imov that reswizzles the source's components.
  */
 static inline nir_ssa_def *
-nir_swizzle(nir_builder *build, nir_ssa_def *src, unsigned swiz[4],
+nir_swizzle(nir_builder *build, nir_ssa_def *src, const unsigned swiz[4],
             unsigned num_components, bool use_fmov)
 {
    nir_alu_src alu_src = { NIR_SRC_INIT };




More information about the mesa-commit mailing list