Enable Vulkan validation layers

BUG=dawn:150

Change-Id: Ie1b252f7fecb323badb40a226e185390d0c241e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7281
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
Li Hao 2019-05-20 02:35:04 +00:00 committed by Commit Bot service account
parent f3f5bf480d
commit 1458dbf518
1 changed files with 11 additions and 9 deletions

View File

@ -120,16 +120,18 @@ namespace dawn_native { namespace vulkan {
usedKnobs.renderDocCapture = true;
}
#endif
#if defined(DAWN_ENABLE_ASSERTS)
if (mGlobalInfo.standardValidation) {
layersToRequest.push_back(kLayerNameLunargStandardValidation);
usedKnobs.standardValidation = true;
if (GetInstance()->IsBackendValidationEnabled()) {
if (mGlobalInfo.standardValidation) {
layersToRequest.push_back(kLayerNameLunargStandardValidation);
usedKnobs.standardValidation = true;
}
if (mGlobalInfo.debugReport) {
extensionsToRequest.push_back(kExtensionNameExtDebugReport);
usedKnobs.debugReport = true;
}
}
if (mGlobalInfo.debugReport) {
extensionsToRequest.push_back(kExtensionNameExtDebugReport);
usedKnobs.debugReport = true;
}
#endif
// Always request all extensions used to create VkSurfaceKHR objects so that they are
// always available for embedders looking to create VkSurfaceKHR on our VkInstance.
if (mGlobalInfo.macosSurface) {