UntoldEngine icon indicating copy to clipboard operation
UntoldEngine copied to clipboard

Revisit the setPurgeableState issue with latest releases of Metal

Open untoldengine opened this issue 4 years ago • 0 comments

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.

untoldengine avatar Dec 03 '21 19:12 untoldengine