From db57db5317e81fb4ce31bc294fdcc199db651542 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 19 Mar 2019 09:04:26 +0000 Subject: [PATCH] nir: const `nir_call_instr::callee` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: c95afe56a8033a87dca7 "nir/spirv: handle kernel function parameters" Cc: Jason Ekstrand Signed-off-by: Eric Engestrom Acked-by: Lionel Landwerlin Acked-by: Tapani Pälli Acked-by: Karol Herbst --- src/compiler/nir/nir.c | 2 +- src/compiler/nir/nir.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 4a7c757db3a..62a80aa87ac 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -515,7 +515,7 @@ nir_intrinsic_instr_create(nir_shader *shader, nir_intrinsic_op op) } nir_call_instr * -nir_call_instr_create(nir_shader *shader, nir_function *callee) +nir_call_instr_create(nir_shader *shader, const nir_function *callee) { const unsigned num_params = callee->num_params; nir_call_instr *instr = diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 067287fab1c..f85b4be5a53 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1084,7 +1084,7 @@ unsigned nir_deref_instr_ptr_as_array_stride(nir_deref_instr *instr); typedef struct { nir_instr instr; - struct nir_function *callee; + const struct nir_function *callee; unsigned num_params; nir_src params[]; @@ -2435,7 +2435,7 @@ nir_intrinsic_instr *nir_intrinsic_instr_create(nir_shader *shader, nir_intrinsic_op op); nir_call_instr *nir_call_instr_create(nir_shader *shader, - nir_function *callee); + const nir_function *callee); nir_tex_instr *nir_tex_instr_create(nir_shader *shader, unsigned num_srcs); -- 2.30.2