mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Fix release build of samples: suppress warnings about unused variables
This commit is contained in:
parent
7f0f77749d
commit
bc37592747
@ -45,14 +45,20 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
glslang::InitializeProcess();
|
glslang::InitializeProcess();
|
||||||
|
|
||||||
std::vector<unsigned int> vertexShaderSPV;
|
std::vector<unsigned int> vertexShaderSPV;
|
||||||
bool ok = vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eVertex, vertexShaderText_PC_C, vertexShaderSPV );
|
#if !defined( NDEBUG )
|
||||||
|
bool ok =
|
||||||
|
#endif
|
||||||
|
vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eVertex, vertexShaderText_PC_C, vertexShaderSPV );
|
||||||
assert( ok );
|
assert( ok );
|
||||||
|
|
||||||
vk::ShaderModuleCreateInfo vertexShaderModuleCreateInfo( {}, vertexShaderSPV );
|
vk::ShaderModuleCreateInfo vertexShaderModuleCreateInfo( {}, vertexShaderSPV );
|
||||||
vk::raii::ShaderModule vertexShaderModule( device, vertexShaderModuleCreateInfo );
|
vk::raii::ShaderModule vertexShaderModule( device, vertexShaderModuleCreateInfo );
|
||||||
|
|
||||||
std::vector<unsigned int> fragmentShaderSPV;
|
std::vector<unsigned int> fragmentShaderSPV;
|
||||||
ok = vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eFragment, fragmentShaderText_C_C, fragmentShaderSPV );
|
#if !defined( NDEBUG )
|
||||||
|
ok =
|
||||||
|
#endif
|
||||||
|
vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eFragment, fragmentShaderText_C_C, fragmentShaderSPV );
|
||||||
assert( ok );
|
assert( ok );
|
||||||
|
|
||||||
vk::ShaderModuleCreateInfo fragmentShaderModuleCreateInfo( {}, fragmentShaderSPV );
|
vk::ShaderModuleCreateInfo fragmentShaderModuleCreateInfo( {}, fragmentShaderSPV );
|
||||||
|
@ -67,10 +67,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
graphicsAndPresentQueueFamilyIndex.second );
|
graphicsAndPresentQueueFamilyIndex.second );
|
||||||
|
|
||||||
/* VULKAN_KEY_START */
|
/* VULKAN_KEY_START */
|
||||||
|
#if !defined( NDEBUG )
|
||||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( swapChainData.colorFormat );
|
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( swapChainData.colorFormat );
|
||||||
assert( ( formatProperties.linearTilingFeatures & vk::FormatFeatureFlagBits::eBlitSrc ) &&
|
assert( ( formatProperties.linearTilingFeatures & vk::FormatFeatureFlagBits::eBlitSrc ) &&
|
||||||
"Format cannot be used as transfer source" );
|
"Format cannot be used as transfer source" );
|
||||||
|
#endif
|
||||||
|
|
||||||
vk::raii::Semaphore imageAcquiredSemaphore( device, vk::SemaphoreCreateInfo() );
|
vk::raii::Semaphore imageAcquiredSemaphore( device, vk::SemaphoreCreateInfo() );
|
||||||
|
|
||||||
|
@ -46,14 +46,20 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
glslang::InitializeProcess();
|
glslang::InitializeProcess();
|
||||||
|
|
||||||
std::vector<unsigned int> vertexShaderSPV;
|
std::vector<unsigned int> vertexShaderSPV;
|
||||||
bool ok = vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eVertex, vertexShaderText_PC_C, vertexShaderSPV );
|
#if !defined( NDEBUG )
|
||||||
|
bool ok =
|
||||||
|
#endif
|
||||||
|
vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eVertex, vertexShaderText_PC_C, vertexShaderSPV );
|
||||||
assert( ok );
|
assert( ok );
|
||||||
|
|
||||||
vk::ShaderModuleCreateInfo vertexShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), vertexShaderSPV );
|
vk::ShaderModuleCreateInfo vertexShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), vertexShaderSPV );
|
||||||
vk::ShaderModule vertexShaderModule = device.createShaderModule( vertexShaderModuleCreateInfo );
|
vk::ShaderModule vertexShaderModule = device.createShaderModule( vertexShaderModuleCreateInfo );
|
||||||
|
|
||||||
std::vector<unsigned int> fragmentShaderSPV;
|
std::vector<unsigned int> fragmentShaderSPV;
|
||||||
ok = vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eFragment, fragmentShaderText_C_C, fragmentShaderSPV );
|
#if !defined( NDEBUG )
|
||||||
|
ok =
|
||||||
|
#endif
|
||||||
|
vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eFragment, fragmentShaderText_C_C, fragmentShaderSPV );
|
||||||
assert( ok );
|
assert( ok );
|
||||||
|
|
||||||
vk::ShaderModuleCreateInfo fragmentShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), fragmentShaderSPV );
|
vk::ShaderModuleCreateInfo fragmentShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), fragmentShaderSPV );
|
||||||
|
@ -68,10 +68,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
graphicsAndPresentQueueFamilyIndex.second );
|
graphicsAndPresentQueueFamilyIndex.second );
|
||||||
|
|
||||||
/* VULKAN_KEY_START */
|
/* VULKAN_KEY_START */
|
||||||
|
#if !defined( NDEBUG )
|
||||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( swapChainData.colorFormat );
|
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( swapChainData.colorFormat );
|
||||||
assert( ( formatProperties.linearTilingFeatures & vk::FormatFeatureFlagBits::eBlitSrc ) &&
|
assert( ( formatProperties.linearTilingFeatures & vk::FormatFeatureFlagBits::eBlitSrc ) &&
|
||||||
"Format cannot be used as transfer source" );
|
"Format cannot be used as transfer source" );
|
||||||
|
#endif
|
||||||
|
|
||||||
vk::Semaphore imageAcquiredSemaphore = device.createSemaphore( vk::SemaphoreCreateInfo() );
|
vk::Semaphore imageAcquiredSemaphore = device.createSemaphore( vk::SemaphoreCreateInfo() );
|
||||||
|
|
||||||
|
@ -153,9 +153,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
vk::DebugUtilsMessengerEXT debugUtilsMessenger = instance.createDebugUtilsMessengerEXT(
|
vk::DebugUtilsMessengerEXT debugUtilsMessenger = instance.createDebugUtilsMessengerEXT(
|
||||||
vk::DebugUtilsMessengerCreateInfoEXT( {}, severityFlags, messageTypeFlags, &debugMessageFunc ) );
|
vk::DebugUtilsMessengerCreateInfoEXT( {}, severityFlags, messageTypeFlags, &debugMessageFunc ) );
|
||||||
|
|
||||||
#if !defined( NDEBUG )
|
|
||||||
instance.destroyDebugUtilsMessengerEXT( debugUtilsMessenger );
|
instance.destroyDebugUtilsMessengerEXT( debugUtilsMessenger );
|
||||||
#endif
|
|
||||||
instance.destroy();
|
instance.destroy();
|
||||||
|
|
||||||
/* VULKAN_KEY_END */
|
/* VULKAN_KEY_END */
|
||||||
|
Loading…
Reference in New Issue
Block a user