Mesa (main): dzn: Add a debug flag to enable D3D12 debug layer
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 19:00:10 UTC 2022
Module: Mesa
Branch: main
Commit: fb24f34fc3ed32afe638184ea48c3a6ede30ea2c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb24f34fc3ed32afe638184ea48c3a6ede30ea2c
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date: Mon Apr 4 14:45:20 2022 -0400
dzn: Add a debug flag to enable D3D12 debug layer
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15742>
---
src/microsoft/vulkan/dzn_device.cpp | 4 +++-
src/microsoft/vulkan/dzn_private.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/microsoft/vulkan/dzn_device.cpp b/src/microsoft/vulkan/dzn_device.cpp
index 215707fc2af..3312a06aeee 100644
--- a/src/microsoft/vulkan/dzn_device.cpp
+++ b/src/microsoft/vulkan/dzn_device.cpp
@@ -101,6 +101,7 @@ static const struct debug_control dzn_debug_options[] = {
{ "internal", DZN_DEBUG_INTERNAL },
{ "signature", DZN_DEBUG_SIG },
{ "gbv", DZN_DEBUG_GBV },
+ { "d3d12", DZN_DEBUG_D3D12 },
{ NULL, 0 }
};
@@ -179,7 +180,8 @@ dzn_instance_create(const VkInstanceCreateInfo *pCreateInfo,
return vk_error(NULL, VK_ERROR_INITIALIZATION_FAILED);
}
- d3d12_enable_debug_layer();
+ if (instance->debug_flags & DZN_DEBUG_D3D12)
+ d3d12_enable_debug_layer();
if (instance->debug_flags & DZN_DEBUG_GBV)
d3d12_enable_gpu_validation();
diff --git a/src/microsoft/vulkan/dzn_private.h b/src/microsoft/vulkan/dzn_private.h
index fea0e5e53e6..d6145dfaa0c 100644
--- a/src/microsoft/vulkan/dzn_private.h
+++ b/src/microsoft/vulkan/dzn_private.h
@@ -934,6 +934,7 @@ enum dzn_debug_flags {
DZN_DEBUG_INTERNAL = 1 << 4,
DZN_DEBUG_SIG = 1 << 5,
DZN_DEBUG_GBV = 1 << 6,
+ DZN_DEBUG_D3D12 = 1 << 7,
};
struct dzn_instance {
More information about the mesa-commit
mailing list