tests: Enable debug layer only when tests are run with "--validate" argument.

This commit is contained in:
Józef Kucia 2016-11-09 14:46:37 +01:00
parent 3c66c74167
commit 3ab664c84a

View File

@ -3111,9 +3111,13 @@ static void test_bundle_state_inheritance(void)
START_TEST(d3d12)
{
BOOL enable_debug_layer = FALSE;
ID3D12Debug *debug;
if (SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
if (argc >= 2 && !strcmp(argv[1], "--validate"))
enable_debug_layer = TRUE;
if (enable_debug_layer && SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
{
ID3D12Debug_EnableDebugLayer(debug);
ID3D12Debug_Release(debug);