public void Dispose() { pipeline?.Dispose(); pipelineLayout?.Dispose(); inputBlock?.Free(); vertModule.Dispose(); fragModule.Dispose(); }
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 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(); }