/// <summary> /// Initialize the GPU emulation context. /// </summary> /// <param name="logLevel">The log level required.</param> public void Initialize(GraphicsDebugLevel logLevel) { HostInitalized.WaitOne(); Renderer.Initialize(logLevel); Methods.ShaderCache.Initialize(); ReadyEvent.Set(); }
/// <summary> /// Initialize the GPU shader cache. /// </summary> public void InitializeShaderCache() { HostInitalized.WaitOne(); foreach (var physicalMemory in PhysicalMemoryRegistry.Values) { physicalMemory.ShaderCache.Initialize(); } }
/// <summary> /// Disposes all GPU resources currently cached. /// It's an error to push any GPU commands after disposal. /// Additionally, the GPU commands FIFO must be empty for disposal, /// and processing of all commands must have finished. /// </summary> public void Dispose() { Methods.ShaderCache.Dispose(); Methods.BufferManager.Dispose(); Methods.TextureManager.Dispose(); Renderer.Dispose(); GPFifo.Dispose(); HostInitalized.Dispose(); }
/// <summary> /// Disposes all GPU resources currently cached. /// It's an error to push any GPU commands after disposal. /// Additionally, the GPU commands FIFO must be empty for disposal, /// and processing of all commands must have finished. /// </summary> public void Dispose() { Renderer.Dispose(); GPFifo.Dispose(); HostInitalized.Dispose(); // Has to be disposed before processing deferred actions, as it will produce some. foreach (var physicalMemory in PhysicalMemoryRegistry.Values) { physicalMemory.Dispose(); } PhysicalMemoryRegistry.Clear(); RunDeferredActions(); }
/// <summary> /// Initialize the GPU shader cache. /// </summary> public void InitializeShaderCache() { HostInitalized.WaitOne(); Methods.ShaderCache.Initialize(); }