diff options
| author | Yong He <yonghe@outlook.com> | 2022-09-26 12:58:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-26 12:58:29 -0700 |
| commit | fcc1a0973f91f0daff9c5c2d0a00208ecb7b91c2 (patch) | |
| tree | 59c4286f6e81babc97d9ea6e5a42095ff1f9c0f5 /tools/gfx/d3d12/d3d12-device.cpp | |
| parent | 4b58c50f394ac912663d86e25e5041157fe8a001 (diff) | |
Use d3d12/vk debug layer when gfx debug layer is enabled. (#2411)
* Use d3d12/vk debug layer when gfx debug layer is enabled.
* Fix.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/d3d12/d3d12-device.cpp')
| -rw-r--r-- | tools/gfx/d3d12/d3d12-device.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp index efc1beb22..e682764f5 100644 --- a/tools/gfx/d3d12/d3d12-device.cpp +++ b/tools/gfx/d3d12/d3d12-device.cpp @@ -471,12 +471,15 @@ Result DeviceImpl::initialize(const Desc& desc) // TODO: we should probably provide a command-line option // to override UseDebug of default rather than leave it // up to each back-end to specify. -#if ENABLE_DEBUG_LAYER - combiner.add( - DeviceCheckFlag::UseDebug, ChangeType::OnOff); ///< First try debug then non debug -#else - combiner.add(DeviceCheckFlag::UseDebug, ChangeType::Off); ///< Don't bother with debug -#endif + if (ENABLE_DEBUG_LAYER || isGfxDebugLayerEnabled()) + { + combiner.add( + DeviceCheckFlag::UseDebug, ChangeType::OnOff); ///< First try debug then non debug + } + else + { + combiner.add(DeviceCheckFlag::UseDebug, ChangeType::Off); ///< Don't bother with debug + } combiner.add( DeviceCheckFlag::UseHardwareDevice, ChangeType::OnOff); ///< First try hardware, then reference |
