Changeset e83b155 in opengl-game for vulkan-ref.cpp


Ignore:
Timestamp:
Oct 18, 2019, 2:40:47 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
603b5bc
Parents:
b794178
git-author:
Dmitry Portnoy <dmitry.portnoy@…> (10/18/19 14:38:29)
git-committer:
Dmitry Portnoy <dmitry.portnoy@…> (10/18/19 14:40:47)
Message:

In vulkangame, destroy the texture sampler, all the uniform buffer resources, and all the resources for each Vulkan image before terminating the program

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-ref.cpp

    rb794178 re83b155  
    19651965         createGraphicsPipeline("shaders/scene-vert.spv", "shaders/scene-frag.spv", scenePipeline);
    19661966         createDescriptorPool(scenePipeline);
    1967 /*** END OF REFACTORED CODE ***/
    19681967         createDescriptorSets(scenePipeline);
    19691968
    1970 /*** START OF REFACTORED CODE ***/
    19711969         createGraphicsPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv", overlayPipeline);
    19721970         createDescriptorPool(overlayPipeline);
    1973 /*** END OF REFACTORED CODE ***/
    19741971         createDescriptorSets(overlayPipeline);
     1972/*** END OF REFACTORED CODE ***/
    19751973
    19761974         createCommandBuffers();
     
    19801978/*** START OF REFACTORED CODE ***/
    19811979         cleanupSwapChain();
    1982 /*** END OF REFACTORED CODE ***/
    19831980
    19841981         vkDestroySampler(device, textureSampler, nullptr);
     
    19921989         vkFreeMemory(device, sdlOverlayImageMemory, nullptr);
    19931990
    1994 /*** START OF REFACTORED CODE ***/
    19951991         cleanupPipelineBuffers(scenePipeline);
    19961992         cleanupPipelineBuffers(overlayPipeline);
     
    20682064
    20692065         vkDestroySwapchainKHR(device, swapChain, nullptr);
    2070 /*** END OF REFACTORED CODE ***/
    20712066
    20722067         for (size_t i = 0; i < swapChainImages.size(); i++) {
     
    20762071      }
    20772072
    2078 /*** START OF REFACTORED CODE ***/
    20792073      void cleanupPipeline(GraphicsPipelineInfo& pipeline) {
    20802074         vkDestroyPipeline(device, pipeline.pipeline, nullptr);
     
    20822076         vkDestroyPipelineLayout(device, pipeline.pipelineLayout, nullptr);
    20832077      }
    2084 /*** END OF REFACTORED CODE ***/
    20852078
    20862079      void cleanupPipelineBuffers(GraphicsPipelineInfo& pipeline) {
    2087 /*** START OF REFACTORED CODE ***/
    20882080         vkDestroyDescriptorSetLayout(device, pipeline.descriptorSetLayout, nullptr);
    20892081/*** END OF REFACTORED CODE ***/
Note: See TracChangeset for help on using the changeset viewer.