mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nir: Allocate nir_call_instr::params out of the nir_call itself.
The lifetime of the params array needs to be match the nir_call_instr itself. So, allocate it using the instruction itself as the context. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
73d106822e
commit
b05d53404c
1 changed files with 1 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ nir_call_instr_create(void *mem_ctx, nir_function_overload *callee)
|
|||
|
||||
instr->callee = callee;
|
||||
instr->num_params = callee->num_params;
|
||||
instr->params = ralloc_array(mem_ctx, nir_deref_var *, instr->num_params);
|
||||
instr->params = ralloc_array(instr, nir_deref_var *, instr->num_params);
|
||||
instr->return_deref = NULL;
|
||||
|
||||
return instr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue