UntoldEngine
UntoldEngine copied to clipboard
Revisit the setPurgeableState issue with latest releases of Metal
Had to comment out the following lines of code when trying to deallocate MLTTextures and MLTBuffers:
//In U4DRenderEntity.mm destructor method
//It seems that setting the Purgeable state to empty, causes metal to ignore buffer dependencies. Had to comment this section out since it is causing the engine to crash whenever I'm deleting an entity.
// [attributeBuffer setPurgeableState:MTLPurgeableStateEmpty];
// [indicesBuffer setPurgeableState:MTLPurgeableStateEmpty];
// [uniformSpaceBuffer setPurgeableState:MTLPurgeableStateEmpty];
//In U4DRender3DModel.mm destructor method
//It seems that setting the Purgeable state to empty, causes metal to ignore buffer dependencies. Had to comment this section out since it is causing the engine to crash whenever I'm deleting an entity.
//[textureObject[i] setPurgeableState:MTLPurgeableStateEmpty];
Please revisit if the engine crashes if these lines of code are uncommented again.