mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glsl/loops: Allocate loop_terminator using new(mem_ctx) syntax.
Patches to follow will introduce code into the loop_terminator constructor. Allocating loop_terminator using new(mem_ctx) syntax will ensure that the constructor runs. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
714e1b331e
commit
4bbf6d1d2b
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ loop_terminator *
|
|||
loop_variable_state::insert(ir_if *if_stmt)
|
||||
{
|
||||
void *mem_ctx = ralloc_parent(this);
|
||||
loop_terminator *t = rzalloc(mem_ctx, loop_terminator);
|
||||
loop_terminator *t = new(mem_ctx) loop_terminator();
|
||||
|
||||
t->ir = if_stmt;
|
||||
this->terminators.push_tail(t);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue