Replaced per-sample validation define with global define in base class
Toggling validation via command line arguments is the preferred way anyway Define was also added as a CMake option
This commit is contained in:
parent
a04a506353
commit
d0211d1f14
86 changed files with 90 additions and 205 deletions
|
|
@ -779,7 +779,7 @@ void VulkanExampleBase::submitFrame()
|
|||
VK_CHECK_RESULT(vkQueueWaitIdle(queue));
|
||||
}
|
||||
|
||||
VulkanExampleBase::VulkanExampleBase(bool enableValidation)
|
||||
VulkanExampleBase::VulkanExampleBase()
|
||||
{
|
||||
#if !defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
// Check for a valid asset path
|
||||
|
|
@ -796,7 +796,10 @@ VulkanExampleBase::VulkanExampleBase(bool enableValidation)
|
|||
}
|
||||
#endif
|
||||
|
||||
settings.validation = enableValidation;
|
||||
// Validation for all samples can be forced at compile time using the FORCE_VALIDATION define
|
||||
#if defined(FORCE_VALIDATION)
|
||||
settings.validation = true;
|
||||
#endif
|
||||
|
||||
// Command line arguments
|
||||
commandLineParser.add("help", { "--help" }, 0, "Show help");
|
||||
|
|
|
|||
|
|
@ -276,7 +276,8 @@ public:
|
|||
bool quit = false;
|
||||
#endif
|
||||
|
||||
VulkanExampleBase(bool enableValidation = false);
|
||||
/** @brief Default base class constructor */
|
||||
VulkanExampleBase();
|
||||
virtual ~VulkanExampleBase();
|
||||
/** @brief Setup the vulkan instance, enable required extensions and connect to the physical device (GPU) */
|
||||
bool initVulkan();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue