MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Hpp / createShaderModule

Function createShaderModule

samples/utils/shaders.cpp:77–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 vk::ShaderModule createShaderModule( vk::Device const & device, vk::ShaderStageFlagBits shaderStage, std::string const & shaderText )
78 {
79 std::vector<unsigned int> shaderSPV;
80 if ( !GLSLtoSPV( shaderStage, shaderText, shaderSPV ) )
81 {
82 throw std::runtime_error( "Could not convert glsl shader to spir-v -> terminating" );
83 }
84
85 return device.createShaderModule( vk::ShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), shaderSPV ) );
86 }
87 } // namespace su
88} // namespace vk

Callers 15

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
initializeMethod · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

GLSLtoSPVFunction · 0.85

Tested by

no test coverage detected