Commit 2c3f102d authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d12/tests: Add option to run tests with validation layers.

parent befe3aa5
...@@ -813,18 +813,28 @@ static void test_swapchain_draw(void) ...@@ -813,18 +813,28 @@ static void test_swapchain_draw(void)
START_TEST(d3d12) START_TEST(d3d12)
{ {
BOOL enable_debug_layer = FALSE;
unsigned int argc, i; unsigned int argc, i;
ID3D12Debug *debug;
char **argv; char **argv;
argc = winetest_get_mainargs(&argv); argc = winetest_get_mainargs(&argv);
for (i = 2; i < argc; ++i) for (i = 2; i < argc; ++i)
{ {
if (!strcmp(argv[i], "--warp")) if (!strcmp(argv[i], "--validate"))
enable_debug_layer = TRUE;
else if (!strcmp(argv[i], "--warp"))
use_warp_adapter = TRUE; use_warp_adapter = TRUE;
else if (!strcmp(argv[i], "--adapter") && i + 1 < argc) else if (!strcmp(argv[i], "--adapter") && i + 1 < argc)
use_adapter_idx = atoi(argv[++i]); use_adapter_idx = atoi(argv[++i]);
} }
if (enable_debug_layer && SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
{
ID3D12Debug_EnableDebugLayer(debug);
ID3D12Debug_Release(debug);
}
print_adapter_info(); print_adapter_info();
test_interfaces(); test_interfaces();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment