mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
Vulkan: add macro for vktrace
Hide vktrace layout behide a marco 'DAWN_USE_VKTRACE' and enable it in build if need.
This commit is contained in:
parent
9daa4ad1c8
commit
92bddc47c9
@ -421,13 +421,16 @@ namespace dawn_native { namespace vulkan {
|
||||
extensions->push_back(extension);
|
||||
};
|
||||
|
||||
// vktrace works by instering a layer, so we need to explicitly enable it if it is present.
|
||||
// vktrace works by instering a layer, but we hide it behind a macro unless we are
|
||||
// debugging in vktrace.
|
||||
// Also it is good to put it in first position so that it doesn't see Vulkan calls inserted
|
||||
// by other layers.
|
||||
#if defined(DAWN_USE_VKTRACE)
|
||||
if (mGlobalInfo.vktrace) {
|
||||
layersToRequest.push_back(kLayerNameLunargVKTrace);
|
||||
usedKnobs->vktrace = true;
|
||||
}
|
||||
#endif
|
||||
// RenderDoc installs a layer at the system level for its capture but we don't want to use
|
||||
// it unless we are debugging in RenderDoc so we hide it behind a macro.
|
||||
#if defined(DAWN_USE_RENDERDOC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user