| 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 |
no test coverage detected