Commit 5d04dd27 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11/tests: Add option to enable debug layer.

Some tests crashes with the debug layer enabled. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 9b94d0fd
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#define SWAPCHAIN_FLAG_SHADER_INPUT 0x1 #define SWAPCHAIN_FLAG_SHADER_INPUT 0x1
static unsigned int use_adapter_idx; static unsigned int use_adapter_idx;
static BOOL enable_debug_layer;
static BOOL use_warp_adapter; static BOOL use_warp_adapter;
static BOOL use_mt = TRUE; static BOOL use_mt = TRUE;
...@@ -1346,6 +1347,9 @@ static ID3D11Device *create_device(const struct device_desc *desc) ...@@ -1346,6 +1347,9 @@ static ID3D11Device *create_device(const struct device_desc *desc)
feature_level_count = ARRAY_SIZE(default_feature_level); feature_level_count = ARRAY_SIZE(default_feature_level);
} }
if (enable_debug_layer)
flags |= D3D11_CREATE_DEVICE_DEBUG;
if ((adapter = create_adapter())) if ((adapter = create_adapter()))
{ {
hr = D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, flags, hr = D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, flags,
...@@ -2037,7 +2041,7 @@ static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level) ...@@ -2037,7 +2041,7 @@ static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
check_interface(device, &IID_ID3D10Multithread, TRUE, TRUE); /* Not available on all Windows versions. */ check_interface(device, &IID_ID3D10Multithread, TRUE, TRUE); /* Not available on all Windows versions. */
todo_wine check_interface(device, &IID_ID3D10Device, FALSE, FALSE); todo_wine check_interface(device, &IID_ID3D10Device, FALSE, FALSE);
todo_wine check_interface(device, &IID_ID3D10Device1, FALSE, FALSE); todo_wine check_interface(device, &IID_ID3D10Device1, FALSE, FALSE);
check_interface(device, &IID_ID3D11InfoQueue, FALSE, FALSE); /* Non-debug mode. */ check_interface(device, &IID_ID3D11InfoQueue, enable_debug_layer, FALSE);
hr = ID3D11Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); hr = ID3D11Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
ok(SUCCEEDED(hr), "Device should implement IDXGIDevice.\n"); ok(SUCCEEDED(hr), "Device should implement IDXGIDevice.\n");
...@@ -28750,7 +28754,9 @@ START_TEST(d3d11) ...@@ -28750,7 +28754,9 @@ START_TEST(d3d11)
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]);
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