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 <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2020-04-17 08:24:45 +00:00 committed by Commit Bot service account
parent 0925720ecb
commit 9c79dc050e
3 changed files with 8 additions and 8 deletions

View File

@ -180,9 +180,9 @@ namespace dawn_native { namespace vulkan {
#endif #endif
if (GetInstance()->IsBackendValidationEnabled()) { if (GetInstance()->IsBackendValidationEnabled()) {
if (mGlobalInfo.standardValidation) { if (mGlobalInfo.validation) {
layersToRequest.push_back(kLayerNameLunargStandardValidation); layersToRequest.push_back(kLayerNameKhronosValidation);
usedKnobs.standardValidation = true; usedKnobs.validation = true;
} }
if (mGlobalInfo.debugReport) { if (mGlobalInfo.debugReport) {
extensionsToRequest.push_back(kExtensionNameExtDebugReport); extensionsToRequest.push_back(kExtensionNameExtDebugReport);

View File

@ -49,7 +49,7 @@ namespace dawn_native { namespace vulkan {
} // namespace } // 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 kLayerNameLunargVKTrace[] = "VK_LAYER_LUNARG_vktrace";
const char kLayerNameRenderDocCapture[] = "VK_LAYER_RENDERDOC_Capture"; const char kLayerNameRenderDocCapture[] = "VK_LAYER_RENDERDOC_Capture";
const char kLayerNameFuchsiaImagePipeSwapchain[] = "VK_LAYER_FUCHSIA_imagepipe_swapchain"; const char kLayerNameFuchsiaImagePipeSwapchain[] = "VK_LAYER_FUCHSIA_imagepipe_swapchain";
@ -102,8 +102,8 @@ namespace dawn_native { namespace vulkan {
"vkEnumerateInstanceLayerProperties")); "vkEnumerateInstanceLayerProperties"));
for (const auto& layer : info.layers) { for (const auto& layer : info.layers) {
if (IsLayerName(layer, kLayerNameLunargStandardValidation)) { if (IsLayerName(layer, kLayerNameKhronosValidation)) {
info.standardValidation = true; info.validation = true;
} }
if (IsLayerName(layer, kLayerNameLunargVKTrace)) { if (IsLayerName(layer, kLayerNameLunargVKTrace)) {
info.vktrace = true; info.vktrace = true;

View File

@ -25,7 +25,7 @@ namespace dawn_native { namespace vulkan {
class Adapter; class Adapter;
class Backend; class Backend;
extern const char kLayerNameLunargStandardValidation[]; extern const char kLayerNameKhronosValidation[];
extern const char kLayerNameLunargVKTrace[]; extern const char kLayerNameLunargVKTrace[];
extern const char kLayerNameRenderDocCapture[]; extern const char kLayerNameRenderDocCapture[];
extern const char kLayerNameFuchsiaImagePipeSwapchain[]; extern const char kLayerNameFuchsiaImagePipeSwapchain[];
@ -56,7 +56,7 @@ namespace dawn_native { namespace vulkan {
// Global information - gathered before the instance is created // Global information - gathered before the instance is created
struct VulkanGlobalKnobs { struct VulkanGlobalKnobs {
// Layers // Layers
bool standardValidation = false; bool validation = false;
bool vktrace = false; bool vktrace = false;
bool renderDocCapture = false; bool renderDocCapture = false;
bool fuchsiaImagePipeSwapchain = false; bool fuchsiaImagePipeSwapchain = false;