diff options
author | Jason Ekstrand <[email protected]> | 2019-03-19 10:18:49 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-03-19 10:19:42 -0500 |
commit | cbfe31ccbe3eafcb5aeb74457e3b67641fd54ae1 (patch) | |
tree | bacad16b799d2ec4dce2afd78117366463520f06 /src/compiler/nir | |
parent | 43b6dd05f746f3c946bc6d259c69fad744989c89 (diff) |
Revert "nir: const `nir_call_instr::callee`"
This reverts commit db57db5317e81fb4ce31bc294fdcc199db651542. When
building IR, nothing is really immutable and, since C has no concept of
constness propagating beyond the first pointer, we have to be vary
careful with how we use it. To just throw const into a function like
this is a lie.
Instead, we should just drop the unneeded const in spirv_to_nir which
this commit does along with the revert.
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir.c | 2 | ||||
-rw-r--r-- | 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 62a80aa87ac..4a7c757db3a 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, const nir_function *callee) +nir_call_instr_create(nir_shader *shader, 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 f85b4be5a53..067287fab1c 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; - const struct nir_function *callee; + 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, - const nir_function *callee); + nir_function *callee); nir_tex_instr *nir_tex_instr_create(nir_shader *shader, unsigned num_srcs); |