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
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);

View File

@ -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;

View File

@ -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;