Enable Metal validation layers
BUG=dawn:150 Change-Id: Id3e9dd7a99e8a195fddb98026ddf256d82a4b1ba Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7300 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:
parent
1458dbf518
commit
027a8f6464
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "dawn_native/metal/BackendMTL.h"
|
||||
|
||||
#include "dawn_native/Instance.h"
|
||||
#include "dawn_native/MetalBackend.h"
|
||||
#include "dawn_native/metal/DeviceMTL.h"
|
||||
|
||||
|
@ -152,6 +153,9 @@ namespace dawn_native { namespace metal {
|
|||
// Implementation of the Metal backend's BackendConnection
|
||||
|
||||
Backend::Backend(InstanceBase* instance) : BackendConnection(instance, BackendType::Metal) {
|
||||
if (GetInstance()->IsBackendValidationEnabled()) {
|
||||
setenv("METAL_DEVICE_WRAPPER_TYPE", "1", 1);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<AdapterBase>> Backend::DiscoverDefaultAdapters() {
|
||||
|
|
Loading…
Reference in New Issue