public void Dispose() { if (!disposed) { //Wait for all rendering to stop before we start disposing of resources logicalDevice.WaitIdle(); //Dispose of the synchronization objects imageAvailableSemaphore.Dispose(); renderFinishedSemaphore.Dispose(); waitFences.DisposeAll(); //Dispose of the scene resources scene?.Dispose(); //Dispose of the swapchain swapchainTextures.DisposeAll(); swapchain.Dispose(); //Dispose of command-pool (will automatically also dispose of the commandbuffers that //where recreated from it) commandPool.Dispose(); //Dispose the Vulkan device and dispose of the os window logicalDevice.Dispose(); nativeWindow.Dispose(); disposed = true; } }
private void TearDown() { device.WaitIdle(); renderFinishedSemaphore.Dispose(); renderFinishedSemaphore = null; imageAvailableSemaphore.Dispose(); imageAvailableSemaphore = null; vertexBufferMemory.Free(); vertexBufferMemory = null; vertexBuffer.Dispose(); vertexBuffer = null; commandPool.Dispose(); commandPool = null; foreach (var frameBuffer in frameBuffers) { frameBuffer.Dispose(); } frameBuffers = null; fragShader.Dispose(); fragShader = null; vertShader.Dispose(); vertShader = null; pipeline.Dispose(); pipeline = null; pipelineLayout.Dispose(); pipelineLayout = null; foreach (var imageView in swapChainImageViews) { imageView.Dispose(); } swapChainImageViews = null; renderPass.Dispose(); renderPass = null; swapChain.Dispose(); swapChain = null; device.Dispose(); device = null; surface.Dispose(); surface = null; instance.Dispose(); instance = null; }
public void Dispose() { ThrowIfDisposed(); transientBuffer.Dispose(); commandPool.Dispose(); fence.Dispose(); disposed = true; }
/// <summary> /// Dispose the object and free its resources /// </summary> public void Dispose() { if (Disposed) { return; } Disposed = true; if (HasCommandPool) { CommandPool?.Dispose(); } }
/// <inheritdoc /> protected override void Dispose(bool disposing) { if (disposing && !_disposed) { _purgeCommandPool.Dispose(); _getContentHashListCommandPool.Dispose(); _getSelectorsCommandPool.Dispose(); _replaceCommandPool.Dispose(); _touchPartitionCommandPool.Dispose(); _touchSingleCommandPool.Dispose(); _directoryLock.Dispose(); _fileSystem.Dispose(); _disposed = true; } base.Dispose(disposing); }
public void Dispose() { if (_disposed) { return; } Output.Dispose(); Inputs.ForEach(input => input.Dispose()); _descriptorPool.Dispose(); _pipeline.Dispose(); _pipelineLayout.Dispose(); _descriptorSetLayout.Dispose(); _commandPool.Dispose(); _fence.Dispose(); _disposed = true; }
public void Cleanup() { /* * Clean up all Vulkan Resources. */ bufferMemory.Dispose(); buffer.Dispose(); computeShaderModule.Dispose(); descriptorPool.Dispose(); descriptorSetLayout.Dispose(); pipelineLayout.Dispose(); foreach (Pipeline pipeline in pipelines) { pipeline.Dispose(); } commandPool.Dispose(); device.Dispose(); instance.Dispose(); }
public override void Dispose() { CommandPool.Dispose(); base.Dispose(); }