The original text mentions to add the VkGraphicsPipelineCreateInfo & vkCreateGraphicsPipelines() at the end of createGraphicsPipeline(). However they should be called before the calls to vkDestroyshaderModule as these are referenced inside the pipelineInfo struct. If you add them at the end (after the destruction, and as the text mentions) you'll get errors like:
The original text mentions to add the VkGraphicsPipelineCreateInfo & vkCreateGraphicsPipelines() at the end of createGraphicsPipeline(). However they should be called before the calls to vkDestroyshaderModule as these are referenced inside the pipelineInfo struct. If you add them at the end (after the destruction, and as the text mentions) you'll get errors like:
(null)(ERROR / SPEC): msgNum: 274780673 - Invalid ShaderModule Object 0xa. The spec valid usage text states 'module must be a valid VkShaderModule handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-module-parameter) Objects: 1 [0] 0xa, type: 15, name: (null)