Free memory associated with SPIR-V generation.
This commit is contained in:
parent
863aa667f3
commit
b7946d16bb
5 changed files with 109 additions and 93 deletions
|
|
@ -1613,7 +1613,13 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
|
|||
void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable)
|
||||
{
|
||||
assert(!pragmaTable);
|
||||
pragmaTable = new TPragmaTable();
|
||||
|
||||
// We allocate this with the thread-pool allocator because the destructors
|
||||
// for TIntermNode's are never called. When TIntermNodes are no longer
|
||||
// needed, the pool allocator destroys all memory at once without
|
||||
// destruction.
|
||||
void* memory = GetThreadPoolAllocator().allocate(sizeof(TPragmaTable));
|
||||
pragmaTable = new(memory) TPragmaTable();
|
||||
*pragmaTable = pTable;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue