diff options
Diffstat (limited to 'mesalib/src/glsl/loop_analysis.h')
-rw-r--r-- | mesalib/src/glsl/loop_analysis.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mesalib/src/glsl/loop_analysis.h b/mesalib/src/glsl/loop_analysis.h index 8bed1db02..05c982fc1 100644 --- a/mesalib/src/glsl/loop_analysis.h +++ b/mesalib/src/glsl/loop_analysis.h @@ -140,6 +140,23 @@ public: { hash_table_dtor(this->var_hash); } + + static void* operator new(size_t size, void *ctx) + { + void *lvs = ralloc_size(ctx, size); + assert(lvs != NULL); + + ralloc_set_destructor(lvs, (void (*)(void*)) destructor); + + return lvs; + } + +private: + static void + destructor(loop_variable_state *lvs) + { + lvs->~loop_variable_state(); + } }; |