The first step in creating a pipeline object is to prepare shader modules. They represent shaders and contain their code written in a SPIR-V assembly. A single module may contain code for multiple shader stages. When we write shader programs and convert them into SPIR-V form, we need to create a shader module (or multiple modules) before we can use shaders in our application.
Creating a shader module
How to do it...
- Take the handle of a logical device stored in a variable of type VkDevice named logical_device.
- Load a binary SPIR-V assembly of a selected shader and store it in a variable of type std::vector<unsigned char> named source_code.
- Create a variable of type VkShaderModuleCreateInfo named shader_module_create_info. Use the following values to initialize...