Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/Vulkan-Loader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Schuchardt <mikes@lunarg.com>2022-06-16 21:58:39 +0300
committerMike Schuchardt <mikes@lunarg.com>2022-06-16 23:35:17 +0300
commit0ace24470ba6dcabefb871a8d6ba77001fcbc1f4 (patch)
tree8ef9aed1f05da13fd29869f11e1ebb2478a983c6
parent71e43122c90f19aca9c387cb43903a0d2e002b08 (diff)
tests: Shuffle devices for sort test
Shuffle the bus IDs for discrete devices pd0, pd3, and pd4. Notably this puts pd0 from icd0 in between pd4 and pd3 from icd2, making default sorted order extremely unlikely if not impossible.
-rw-r--r--tests/loader_regression_tests.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/loader_regression_tests.cpp b/tests/loader_regression_tests.cpp
index 5ed718425..141c1aa79 100644
--- a/tests/loader_regression_tests.cpp
+++ b/tests/loader_regression_tests.cpp
@@ -2650,7 +2650,7 @@ TEST(SortedPhysicalDevices, DevicesSortedDisabled) {
env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
- env.get_test_icd(0).physical_devices.push_back({"pd0", 7});
+ env.get_test_icd(0).physical_devices.push_back({"pd0", 4});
FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
VK_API_VERSION_1_0, 888, 0xAAA001);
env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2668,11 +2668,11 @@ TEST(SortedPhysicalDevices, DevicesSortedDisabled) {
env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
env.get_test_icd(2).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
- env.get_test_icd(2).physical_devices.push_back({"pd3", 1});
+ env.get_test_icd(2).physical_devices.push_back({"pd3", 7});
FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
VK_API_VERSION_1_0, 75, 0xCCCC001);
env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
- env.get_test_icd(2).physical_devices.push_back({"pd4", 4});
+ env.get_test_icd(2).physical_devices.push_back({"pd4", 1});
FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
VK_API_VERSION_1_0, 75, 0xCCCC002);
env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2704,17 +2704,17 @@ TEST(SortedPhysicalDevices, DevicesSortedDisabled) {
switch (dev) {
case 0:
- if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU || strcmp("pd3", props.deviceName)) {
+ if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU || strcmp("pd4", props.deviceName)) {
sorted = false;
}
break;
case 1:
- if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU || strcmp("pd4", props.deviceName)) {
+ if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU || strcmp("pd0", props.deviceName)) {
sorted = false;
}
break;
case 2:
- if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU || strcmp("pd0", props.deviceName)) {
+ if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU || strcmp("pd3", props.deviceName)) {
sorted = false;
}
break;