fix some warnings (errors) on release build.
This commit is contained in:
@@ -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 ) );
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ namespace vk
|
||||
|
||||
MonochromeImageGenerator::MonochromeImageGenerator( std::array<unsigned char, 3> const & rgb ) : m_rgb( rgb ) {}
|
||||
|
||||
void MonochromeImageGenerator::operator()( void * data, vk::Extent2D & extent ) const
|
||||
void MonochromeImageGenerator::operator()( void * data, vk::Extent2D const & extent ) const
|
||||
{
|
||||
// fill in with the monochrome color
|
||||
unsigned char * pImageMemory = static_cast<unsigned char *>( data );
|
||||
@@ -1041,10 +1041,10 @@ namespace vk
|
||||
assert( m_channels == 4 );
|
||||
}
|
||||
|
||||
void PixelsImageGenerator::operator()( void * data, vk::Extent2D & extent ) const
|
||||
void PixelsImageGenerator::operator()( void * data, vk::Extent2D const & extent ) const
|
||||
{
|
||||
assert( extent == m_extent );
|
||||
memcpy( data, m_pixels, m_extent.width * m_extent.height * m_channels );
|
||||
memcpy( data, m_pixels, extent.width * extent.height * m_channels );
|
||||
}
|
||||
|
||||
TextureData::TextureData( vk::PhysicalDevice const & physicalDevice,
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace vk
|
||||
public:
|
||||
MonochromeImageGenerator( std::array<unsigned char, 3> const & rgb );
|
||||
|
||||
void operator()( void * data, vk::Extent2D & extent ) const;
|
||||
void operator()( void * data, vk::Extent2D const & extent ) const;
|
||||
|
||||
private:
|
||||
std::array<unsigned char, 3> const & m_rgb;
|
||||
@@ -256,7 +256,7 @@ namespace vk
|
||||
public:
|
||||
PixelsImageGenerator( vk::Extent2D const & extent, size_t channels, unsigned char const * pixels );
|
||||
|
||||
void operator()( void * data, vk::Extent2D & extent ) const;
|
||||
void operator()( void * data, vk::Extent2D const & extent ) const;
|
||||
|
||||
private:
|
||||
vk::Extent2D m_extent;
|
||||
|
||||
Reference in New Issue
Block a user