From 9c79dc050e525c5dd4ceab7ab66f34ed7332ed0a Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 17 Apr 2020 08:24:45 +0000 Subject: [PATCH] Vulkan: Use VK_LAYER_KHRONOS_validation This layer replaces VK_LAYER_LUNARG_standard_validation that is now deprecated. Bug: dawn:388 Change-Id: I488c175b997434a8e22deecfba3fc89495969cbc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19722 Reviewed-by: Kai Ninomiya Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- src/dawn_native/vulkan/BackendVk.cpp | 6 +++--- src/dawn_native/vulkan/VulkanInfo.cpp | 6 +++--- src/dawn_native/vulkan/VulkanInfo.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dawn_native/vulkan/BackendVk.cpp b/src/dawn_native/vulkan/BackendVk.cpp index 0b68bd1b24..d03bffd443 100644 --- a/src/dawn_native/vulkan/BackendVk.cpp +++ b/src/dawn_native/vulkan/BackendVk.cpp @@ -180,9 +180,9 @@ namespace dawn_native { namespace vulkan { #endif if (GetInstance()->IsBackendValidationEnabled()) { - if (mGlobalInfo.standardValidation) { - layersToRequest.push_back(kLayerNameLunargStandardValidation); - usedKnobs.standardValidation = true; + if (mGlobalInfo.validation) { + layersToRequest.push_back(kLayerNameKhronosValidation); + usedKnobs.validation = true; } if (mGlobalInfo.debugReport) { extensionsToRequest.push_back(kExtensionNameExtDebugReport); diff --git a/src/dawn_native/vulkan/VulkanInfo.cpp b/src/dawn_native/vulkan/VulkanInfo.cpp index 4ec4dfd001..2a3226245b 100644 --- a/src/dawn_native/vulkan/VulkanInfo.cpp +++ b/src/dawn_native/vulkan/VulkanInfo.cpp @@ -49,7 +49,7 @@ namespace dawn_native { namespace vulkan { } // namespace - const char kLayerNameLunargStandardValidation[] = "VK_LAYER_LUNARG_standard_validation"; + const char kLayerNameKhronosValidation[] = "VK_LAYER_KHRONOS_validation"; const char kLayerNameLunargVKTrace[] = "VK_LAYER_LUNARG_vktrace"; const char kLayerNameRenderDocCapture[] = "VK_LAYER_RENDERDOC_Capture"; const char kLayerNameFuchsiaImagePipeSwapchain[] = "VK_LAYER_FUCHSIA_imagepipe_swapchain"; @@ -102,8 +102,8 @@ namespace dawn_native { namespace vulkan { "vkEnumerateInstanceLayerProperties")); for (const auto& layer : info.layers) { - if (IsLayerName(layer, kLayerNameLunargStandardValidation)) { - info.standardValidation = true; + if (IsLayerName(layer, kLayerNameKhronosValidation)) { + info.validation = true; } if (IsLayerName(layer, kLayerNameLunargVKTrace)) { info.vktrace = true; diff --git a/src/dawn_native/vulkan/VulkanInfo.h b/src/dawn_native/vulkan/VulkanInfo.h index b62b32a9fe..354d9b38c9 100644 --- a/src/dawn_native/vulkan/VulkanInfo.h +++ b/src/dawn_native/vulkan/VulkanInfo.h @@ -25,7 +25,7 @@ namespace dawn_native { namespace vulkan { class Adapter; class Backend; - extern const char kLayerNameLunargStandardValidation[]; + extern const char kLayerNameKhronosValidation[]; extern const char kLayerNameLunargVKTrace[]; extern const char kLayerNameRenderDocCapture[]; extern const char kLayerNameFuchsiaImagePipeSwapchain[]; @@ -56,7 +56,7 @@ namespace dawn_native { namespace vulkan { // Global information - gathered before the instance is created struct VulkanGlobalKnobs { // Layers - bool standardValidation = false; + bool validation = false; bool vktrace = false; bool renderDocCapture = false; bool fuchsiaImagePipeSwapchain = false;