nir: const `nir_call_instr::callee`
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 19 Mar 2019 09:04:26 +0000 (09:04 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Tue, 19 Mar 2019 12:51:53 +0000 (12:51 +0000)
Fixes: c95afe56a8033a87dca7 "nir/spirv: handle kernel function parameters"
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
src/compiler/nir/nir.c
src/compiler/nir/nir.h

index 4a7c757db3a4f8190097087f625ea7ac6334d155..62a80aa87ac1f9c6a11d5e245726d13fdc4db7b7 100644 (file)
@@ -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 =
index 067287fab1ce67a8da6338c6989281afa57a15a4..f85b4be5a536d47e28a62316a93a36aab8b924d3 100644 (file)
@@ -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);