fix some warnings (errors) on release build.

This commit is contained in:
asuessenbach
2020-10-20 09:55:19 +02:00
parent 32c994335a
commit 2e95313c1d
6 changed files with 25 additions and 7 deletions

View File

@@ -91,8 +91,10 @@ namespace vk
std::string const & shaderText )
{
std::vector<unsigned int> shaderSPV;
bool ok = GLSLtoSPV( shaderStage, shaderText, shaderSPV );
assert( ok );
if ( !GLSLtoSPV( shaderStage, shaderText, shaderSPV ) )
{
throw std::runtime_error( "Could not convert glsl shader to spir-v -> terminating" );
}
return device->createShaderModuleUnique( vk::ShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), shaderSPV ) );
}