mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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:
parent
09bffa48c6
commit
a6e482aa88
@ -559,18 +559,25 @@ 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);
|
||||||
|
|
||||||
for (i = 0; i < count; ++i)
|
if (!getenv("VKD3D_VULKAN_DEVICE"))
|
||||||
{
|
{
|
||||||
trace("Creating device for Vulkan physical device %p.\n", vk_physical_devices[i]);
|
for (i = 0; i < count; ++i)
|
||||||
|
{
|
||||||
|
trace("Creating device for Vulkan physical device %p.\n", vk_physical_devices[i]);
|
||||||
|
|
||||||
create_info.vk_physical_device = vk_physical_devices[i];
|
create_info.vk_physical_device = vk_physical_devices[i];
|
||||||
hr = vkd3d_create_device(&create_info, &IID_ID3D12Device, (void **)&device);
|
hr = vkd3d_create_device(&create_info, &IID_ID3D12Device, (void **)&device);
|
||||||
ok(hr == S_OK, "Failed to create device, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to create device, hr %#x.\n", hr);
|
||||||
vk_physical_device = vkd3d_get_vk_physical_device(device);
|
vk_physical_device = vkd3d_get_vk_physical_device(device);
|
||||||
ok(vk_physical_device == vk_physical_devices[i],
|
ok(vk_physical_device == vk_physical_devices[i],
|
||||||
"Got unexpected Vulkan physical device %p.\n", vk_physical_device);
|
"Got unexpected Vulkan physical device %p.\n", vk_physical_device);
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user