@@ -3658,31 +3658,31 @@ TEST(SortedPhysicalDevices, DevicesSortedDisabled) {
36583658 ASSERT_EQ (VK_SUCCESS, instance->vkEnumeratePhysicalDevices (instance, &device_count, physical_devices.data ()));
36593659 ASSERT_EQ (device_count, max_phys_devs);
36603660
3661- // make sure the order is what we started with - but its a bit wonky due to the loader reading physical devices "backwards"
3661+ // make sure the order is what we started with
36623662 VkPhysicalDeviceProperties props{};
36633663 instance->vkGetPhysicalDeviceProperties (physical_devices[0 ], &props);
3664- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU );
3665- ASSERT_STREQ (props.deviceName , " pd5 " );
3664+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU );
3665+ ASSERT_STREQ (props.deviceName , " pd0 " );
36663666
36673667 instance->vkGetPhysicalDeviceProperties (physical_devices[1 ], &props);
3668- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU );
3669- ASSERT_STREQ (props.deviceName , " pd3 " );
3668+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU );
3669+ ASSERT_STREQ (props.deviceName , " pd1 " );
36703670
36713671 instance->vkGetPhysicalDeviceProperties (physical_devices[2 ], &props);
3672- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
3673- ASSERT_STREQ (props.deviceName , " pd4" );
3674-
3675- instance->vkGetPhysicalDeviceProperties (physical_devices[3 ], &props);
36763672 ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_CPU);
36773673 ASSERT_STREQ (props.deviceName , " pd2" );
36783674
3675+ instance->vkGetPhysicalDeviceProperties (physical_devices[3 ], &props);
3676+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
3677+ ASSERT_STREQ (props.deviceName , " pd3" );
3678+
36793679 instance->vkGetPhysicalDeviceProperties (physical_devices[4 ], &props);
36803680 ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
3681- ASSERT_STREQ (props.deviceName , " pd0 " );
3681+ ASSERT_STREQ (props.deviceName , " pd4 " );
36823682
36833683 instance->vkGetPhysicalDeviceProperties (physical_devices[5 ], &props);
3684- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU );
3685- ASSERT_STREQ (props.deviceName , " pd1 " );
3684+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU );
3685+ ASSERT_STREQ (props.deviceName , " pd5 " );
36863686
36873687 // Make sure if we call enumerate again, the information is the same
36883688 std::array<VkPhysicalDevice, max_phys_devs> physical_devices_again;
@@ -3974,39 +3974,40 @@ TEST(SortedPhysicalDevices, DeviceGroupsSortedDisabled) {
39743974 ASSERT_EQ (VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups (inst, &group_count, physical_device_groups.data ()));
39753975 ASSERT_EQ (group_count, max_phys_dev_groups);
39763976
3977- // make sure the order is what we started with - but its a bit wonky due to the loader reading physical devices "backwards"
3977+ // make sure the order is what we started with
39783978 VkPhysicalDeviceProperties props{};
3979+
39793980 inst->vkGetPhysicalDeviceProperties (physical_devices[0 ], &props);
3980- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU );
3981- ASSERT_STREQ (props.deviceName , " pd7 " );
3981+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU );
3982+ ASSERT_STREQ (props.deviceName , " pd0 " );
39823983
39833984 inst->vkGetPhysicalDeviceProperties (physical_devices[1 ], &props);
3984- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU );
3985- ASSERT_STREQ (props.deviceName , " pd4 " );
3985+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU );
3986+ ASSERT_STREQ (props.deviceName , " pd1 " );
39863987
39873988 inst->vkGetPhysicalDeviceProperties (physical_devices[2 ], &props);
39883989 ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
3989- ASSERT_STREQ (props.deviceName , " pd5 " );
3990+ ASSERT_STREQ (props.deviceName , " pd2 " );
39903991
39913992 inst->vkGetPhysicalDeviceProperties (physical_devices[3 ], &props);
3992- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
3993- ASSERT_STREQ (props.deviceName , " pd6" );
3994-
3995- inst->vkGetPhysicalDeviceProperties (physical_devices[4 ], &props);
39963993 ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_CPU);
39973994 ASSERT_STREQ (props.deviceName , " pd3" );
39983995
3996+ inst->vkGetPhysicalDeviceProperties (physical_devices[4 ], &props);
3997+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
3998+ ASSERT_STREQ (props.deviceName , " pd4" );
3999+
39994000 inst->vkGetPhysicalDeviceProperties (physical_devices[5 ], &props);
40004001 ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
4001- ASSERT_STREQ (props.deviceName , " pd0 " );
4002+ ASSERT_STREQ (props.deviceName , " pd5 " );
40024003
40034004 inst->vkGetPhysicalDeviceProperties (physical_devices[6 ], &props);
4004- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU );
4005- ASSERT_STREQ (props.deviceName , " pd1 " );
4005+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU );
4006+ ASSERT_STREQ (props.deviceName , " pd6 " );
40064007
40074008 inst->vkGetPhysicalDeviceProperties (physical_devices[7 ], &props);
4008- ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU );
4009- ASSERT_STREQ (props.deviceName , " pd2 " );
4009+ ASSERT_EQ (props.deviceType , VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU );
4010+ ASSERT_STREQ (props.deviceName , " pd7 " );
40104011
40114012 // Make sure if we call enumerate again, the information is the same
40124013 std::array<VkPhysicalDeviceGroupProperties, max_phys_dev_groups> physical_device_groups_again{};
@@ -4446,9 +4447,9 @@ TEST(ManifestDiscovery, AppleBundles) {
44464447 // Should get both GPUs, in reverse order to driver enumeration (due to enumerating the last driver first)
44474448 VkPhysicalDeviceProperties props{};
44484449 inst->vkGetPhysicalDeviceProperties (physical_devices[0 ], &props);
4449- ASSERT_EQ (test_physical_device_1.properties .deviceID , props.deviceID );
4450- inst->vkGetPhysicalDeviceProperties (physical_devices[1 ], &props);
44514450 ASSERT_EQ (test_physical_device_0.properties .deviceID , props.deviceID );
4451+ inst->vkGetPhysicalDeviceProperties (physical_devices[1 ], &props);
4452+ ASSERT_EQ (test_physical_device_1.properties .deviceID , props.deviceID );
44524453}
44534454
44544455// Add two drivers, one to the bundle and one using the driver env-var
@@ -4717,10 +4718,10 @@ TEST(EnumerateAdapterPhysicalDevices, SameAdapterLUID_reordered) {
47174718
47184719 // Physical devices are enumerated:
47194720 // a) first in the order of LUIDs showing up in DXGIAdapter list
4720- // b) then in the reverse order to the drivers insertion into the test framework
4721- add_dxgi_adapter (env, " physical_device_2" , LUID{10 , 100 }, 2 );
4722- add_dxgi_adapter (env, " physical_device_1" , LUID{20 , 200 }, 1 );
4721+ // b) then in the order to the drivers insertion into the test framework
47234722 auto phys_dev_handle = add_dxgi_adapter (env, " physical_device_0" , LUID{10 , 100 }, 2 );
4723+ add_dxgi_adapter (env, " physical_device_1" , LUID{20 , 200 }, 1 );
4724+ add_dxgi_adapter (env, " physical_device_2" , LUID{10 , 100 }, 2 );
47244725
47254726 {
47264727 uint32_t returned_physical_count = 0 ;
@@ -4764,7 +4765,7 @@ TEST(EnumerateAdapterPhysicalDevices, SameAdapterLUID_reordered) {
47644765 }
47654766 // Set the first physical device that is enumerated to be a 'layered' driver so it should be swapped with the first physical
47664767 // device
4767- env.get_test_icd (2 ).physical_devices .at (phys_dev_handle).layered_driver_underlying_api =
4768+ env.get_test_icd (0 ).physical_devices .at (phys_dev_handle).layered_driver_underlying_api =
47684769 VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT;
47694770 {
47704771 uint32_t returned_physical_count = 0 ;
0 commit comments