EngineMtlCreateInfo struct
Attributes of the Metal-based engine implementation.
Contents
- Reference
Base classes
- struct EngineCreateInfo
- Engine creation attibutes.
Public variables
- Uint32 DynamicHeapPageSize
- A device context uses dynamic heap when it needs to allocate temporary CPU-accessible memory to update a resource via IDeviceContext::
UpdateBuffer() or IDeviceContext:: UpdateTexture(), or to map dynamic resources. Device contexts first request a chunk of memory from global dynamic resource manager and then suballocate from this chunk in a lock-free fashion. DynamicHeapPageSize defines the size of this chunk. - bool UseAutoreleasePoolsInContexts
- Indicates if device contexts should automatically manage autorelease pools.
Variable documentation
bool Diligent:: EngineMtlCreateInfo:: UseAutoreleasePoolsInContexts
Indicates if device contexts should automatically manage autorelease pools.
Metal API creates a lot of autoreleased objects. By default, the engine will catch all these objects by pushing autorelease pools where necessary. When UseAutoreleasePoolsInContexts is set to false, the engine will not use autorelease pools in device contexts and the application will be responsible for ensuring that all context commands are issued from within an autorelease pool to avoid memory leaks.
Creating device objects will not leak memory even when UseAutoreleasePoolsInContexts is set to false.