[VulkanHpp] changed to "VK_LAYER_KHRONOS_validation" as validation layer (#324)

+ fixed one issue caught by that layer in InputAttachment.
This commit is contained in:
Andreas Süßenbach 2019-04-30 17:03:26 +02:00 committed by Markus Tavenrath
parent 1a7779e75b
commit 39d204839d
3 changed files with 5 additions and 16 deletions

View File

@ -93,22 +93,11 @@ int main(int /*argc*/, char ** /*argv*/)
// Use standard_validation meta layer that enables all recommended validation layers
std::vector<char const*> instanceLayerNames;
instanceLayerNames.push_back("VK_LAYER_LUNARG_standard_validation");
instanceLayerNames.push_back("VK_LAYER_KHRONOS_validation");
if (!checkLayers(instanceLayerNames, instanceLayerProperties))
{
// If standard validation is not present, search instead for the individual layers that make it up, in the correct order.
instanceLayerNames.clear();
instanceLayerNames.push_back("VK_LAYER_GOOGLE_threading");
instanceLayerNames.push_back("VK_LAYER_LUNARG_parameter_validation");
instanceLayerNames.push_back("VK_LAYER_LUNARG_object_tracker");
instanceLayerNames.push_back("VK_LAYER_LUNARG_core_validation");
instanceLayerNames.push_back("VK_LAYER_GOOGLE_unique_objects");
if (!checkLayers(instanceLayerNames, instanceLayerProperties))
{
std::cout << "Set the environment variable VK_LAYER_PATH to point to the location of your layers" << std::endl;
exit(1);
}
std::cout << "Set the environment variable VK_LAYER_PATH to point to the location of your layers" << std::endl;
exit(1);
}
/* Enable debug callback extension */

View File

@ -159,7 +159,7 @@ int main(int /*argc*/, char ** /*argv*/)
vk::UniqueSemaphore imageAcquiredSemaphore = device->createSemaphoreUnique(vk::SemaphoreCreateInfo());
vk::ResultValue<uint32_t> result = device->acquireNextImage2KHR(vk::AcquireNextImageInfoKHR(swapChainData.swapChain.get(), UINT64_MAX, imageAcquiredSemaphore.get()));
vk::ResultValue<uint32_t> result = device->acquireNextImage2KHR(vk::AcquireNextImageInfoKHR(swapChainData.swapChain.get(), UINT64_MAX, imageAcquiredSemaphore.get(), {}, 1));
assert(result.result == vk::Result::eSuccess);
uint32_t currentBuffer = result.value;

View File

@ -159,7 +159,7 @@ namespace vk
std::vector<char const*> enabledLayers;
#if !defined(NDEBUG)
// Enable standard validation layer to find as much errors as possible!
enabledLayers.push_back("VK_LAYER_LUNARG_standard_validation");
enabledLayers.push_back("VK_LAYER_KHRONOS_validation");
#endif
std::vector<char const*> enabledExtensions;