Mesa (master): nir: add a 'const' qualifier to nir_ssa_def_components_read()
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Fri Jan 12 11:29:56 UTC 2018
Module: Mesa
Branch: master
Commit: d5e369ff8a485e9882a7565c15c20581a23f905f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5e369ff8a485e9882a7565c15c20581a23f905f
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Jan 11 22:07:23 2018 +0100
nir: add a 'const' qualifier to nir_ssa_def_components_read()
To avoid compilation warnings and because this helper
shouldn't update anything.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/compiler/nir/nir.c | 2 +-
src/compiler/nir/nir.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index 692d97bf9a..bdd8960403 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -1650,7 +1650,7 @@ nir_ssa_def_rewrite_uses_after(nir_ssa_def *def, nir_src new_src,
}
uint8_t
-nir_ssa_def_components_read(nir_ssa_def *def)
+nir_ssa_def_components_read(const nir_ssa_def *def)
{
uint8_t read_mask = 0;
nir_foreach_use(use, def) {
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 440c3fe997..41a07b0b48 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2277,7 +2277,7 @@ void nir_ssa_def_rewrite_uses(nir_ssa_def *def, nir_src new_src);
void nir_ssa_def_rewrite_uses_after(nir_ssa_def *def, nir_src new_src,
nir_instr *after_me);
-uint8_t nir_ssa_def_components_read(nir_ssa_def *def);
+uint8_t nir_ssa_def_components_read(const nir_ssa_def *def);
/*
* finds the next basic block in source-code order, returns NULL if there is
More information about the mesa-commit
mailing list