tests: Skip some tests when VKD3D_VULKAN_DEVICE is set.

Allows running tests with VKD3D_VULKAN_DEVICE.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-04-01 11:19:47 +02:00 committed by Alexandre Julliard
parent 09bffa48c6
commit a6e482aa88

View File

@ -559,6 +559,8 @@ static void test_physical_device(void)
vr = vkEnumeratePhysicalDevices(vk_instance, &count, vk_physical_devices); vr = vkEnumeratePhysicalDevices(vk_instance, &count, vk_physical_devices);
ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr); ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr);
if (!getenv("VKD3D_VULKAN_DEVICE"))
{
for (i = 0; i < count; ++i) for (i = 0; i < count; ++i)
{ {
trace("Creating device for Vulkan physical device %p.\n", vk_physical_devices[i]); trace("Creating device for Vulkan physical device %p.\n", vk_physical_devices[i]);
@ -572,6 +574,11 @@ static void test_physical_device(void)
refcount = ID3D12Device_Release(device); refcount = ID3D12Device_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount); ok(!refcount, "Device has %u references left.\n", refcount);
} }
}
else
{
skip("VKD3D_VULKAN_DEVICE is set.\n");
}
free(vk_physical_devices); free(vk_physical_devices);
refcount = vkd3d_instance_decref(instance); refcount = vkd3d_instance_decref(instance);