From 39d204839d7999fae38b70ba1cbdfc9428772ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Tue, 30 Apr 2019 17:03:26 +0200 Subject: [PATCH] [VulkanHpp] changed to "VK_LAYER_KHRONOS_validation" as validation layer (#324) + fixed one issue caught by that layer in InputAttachment. --- .../EnableValidationWithCallback.cpp | 17 +++-------------- samples/InputAttachment/InputAttachment.cpp | 2 +- samples/utils/utils.cpp | 2 +- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp b/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp index 6107413..0f14ecd 100644 --- a/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp +++ b/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp @@ -93,22 +93,11 @@ int main(int /*argc*/, char ** /*argv*/) // Use standard_validation meta layer that enables all recommended validation layers std::vector 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 */ diff --git a/samples/InputAttachment/InputAttachment.cpp b/samples/InputAttachment/InputAttachment.cpp index b99f963..609aaa0 100644 --- a/samples/InputAttachment/InputAttachment.cpp +++ b/samples/InputAttachment/InputAttachment.cpp @@ -159,7 +159,7 @@ int main(int /*argc*/, char ** /*argv*/) vk::UniqueSemaphore imageAcquiredSemaphore = device->createSemaphoreUnique(vk::SemaphoreCreateInfo()); - vk::ResultValue result = device->acquireNextImage2KHR(vk::AcquireNextImageInfoKHR(swapChainData.swapChain.get(), UINT64_MAX, imageAcquiredSemaphore.get())); + vk::ResultValue result = device->acquireNextImage2KHR(vk::AcquireNextImageInfoKHR(swapChainData.swapChain.get(), UINT64_MAX, imageAcquiredSemaphore.get(), {}, 1)); assert(result.result == vk::Result::eSuccess); uint32_t currentBuffer = result.value; diff --git a/samples/utils/utils.cpp b/samples/utils/utils.cpp index 40fdd67..bd0d81c 100644 --- a/samples/utils/utils.cpp +++ b/samples/utils/utils.cpp @@ -159,7 +159,7 @@ namespace vk std::vector 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 enabledExtensions;