Fix memory leak not destroying spirv_cross objects. When creating a lot of pipelines this was causing a large memory leak.
This commit is contained in:
parent
b543d08afe
commit
9896403f9c
@ -229,6 +229,7 @@ MVK_PUBLIC_SYMBOL bool SPIRVToMSLConverter::convert(SPIRVToMSLConverterContext&
|
||||
// Populate content extracted from the SPRI-V compiler.
|
||||
populateEntryPoint(_entryPoint, pMSLCompiler, context.options);
|
||||
context.options.isRasterizationDisabled = pMSLCompiler && pMSLCompiler->get_is_rasterization_disabled();
|
||||
delete pMSLCompiler;
|
||||
|
||||
// Copy whether the vertex attributes and resource bindings are used by the shader
|
||||
uint32_t vaCnt = (uint32_t)vtxAttrs.size();
|
||||
@ -261,6 +262,7 @@ MVK_PUBLIC_SYMBOL bool SPIRVToMSLConverter::convert(SPIRVToMSLConverterContext&
|
||||
}
|
||||
}
|
||||
#endif
|
||||
delete pGLSLCompiler;
|
||||
}
|
||||
|
||||
return _wasConverted;
|
||||
|
Loading…
x
Reference in New Issue
Block a user