dzn: Add a debug flag to enable D3D12 debug layer

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15742>
This commit is contained in:
Louis-Francis Ratté-Boulianne
2022-04-04 14:45:20 -04:00
committed by Marge Bot
parent f7ddd584ab
commit fb24f34fc3
2 changed files with 4 additions and 1 deletions

View File

@@ -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();

View File

@@ -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 {