Cleanup test creation of queues
authorCharles Giessen <charles@lunarg.com>
Mon, 19 Jun 2023 02:52:43 +0000 (20:52 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 20 Jun 2023 19:49:58 +0000 (13:49 -0600)
This commit removes queue creation from many tests because they were not a
primary part of the test. Many tests are written by first copying a previous
test and modifying it, which meant that a handful of initial tests would
include queue creation logic then get copied into many other tests where it
does not make sense.

tests/framework/icd/test_icd.cpp
tests/loader_alloc_callback_tests.cpp
tests/loader_get_proc_addr_tests.cpp
tests/loader_handle_validation_tests.cpp
tests/loader_layer_tests.cpp
tests/loader_regression_tests.cpp
tests/loader_threading_tests.cpp
tests/loader_unknown_ext_tests.cpp
tests/loader_wsi_tests.cpp

index c0bba240ac2c738d56976ea812dca9b08cd61fa3..6e79b0b0695b358b4fecb47e12a644120542de2d 100644 (file)
@@ -897,7 +897,10 @@ VKAPI_ATTR VkResult VKAPI_CALL test_vkAllocateCommandBuffers([[maybe_unused]] Vk
 
 VKAPI_ATTR void VKAPI_CALL test_vkGetDeviceQueue([[maybe_unused]] VkDevice device, [[maybe_unused]] uint32_t queueFamilyIndex,
                                                  uint32_t queueIndex, VkQueue* pQueue) {
-    *pQueue = icd.physical_devices.back().queue_handles[queueIndex].handle;
+    auto fd = icd.lookup_device(device);
+    if (fd.found) {
+        *pQueue = icd.physical_devices.at(fd.phys_dev_index).queue_handles[queueIndex].handle;
+    }
 }
 
 // VK_EXT_acquire_drm_display
index f181a8190793c72c331432b760e45757c65fefb7..a66edaf63ff17703b3293f130bc7fdf2ec5d283f 100644 (file)
@@ -269,12 +269,14 @@ TEST(Allocation, InstanceAndDevice) {
         ASSERT_EQ(family.timestampValidBits, 0U);
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         ASSERT_EQ(inst->vkCreateDevice(physical_device, dev_create_info.get(), tracker.get(), &device), VK_SUCCESS);
+
+        VkQueue queue;
+        inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
         inst->vkDestroyDevice(device, tracker.get());
     }
     ASSERT_TRUE(tracker.empty());
@@ -317,12 +319,13 @@ TEST(Allocation, InstanceButNotDevice) {
         ASSERT_EQ(family.timestampValidBits, 0U);
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         ASSERT_EQ(inst->vkCreateDevice(physical_device, dev_create_info.get(), nullptr, &device), VK_SUCCESS);
+        VkQueue queue;
+        inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
         inst->vkDestroyDevice(device, nullptr);
     }
     ASSERT_TRUE(tracker.empty());
@@ -374,12 +377,14 @@ TEST(Allocation, DeviceButNotInstance) {
         ASSERT_EQ(family.timestampValidBits, 0U);
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         ASSERT_EQ(inst->vkCreateDevice(physical_device, dev_create_info.get(), tracker.get(), &device), VK_SUCCESS);
+
+        VkQueue queue;
+        inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
         inst->vkDestroyDevice(device, tracker.get());
     }
     ASSERT_TRUE(tracker.empty());
@@ -633,13 +638,14 @@ TEST(Allocation, CreateDeviceIntentionalAllocFail) {
         MemoryTracker tracker({false, 0, true, fail_index});
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         result = inst->vkCreateDevice(physical_devices[0], dev_create_info.get(), tracker.get(), &device);
         if (result == VK_SUCCESS || fail_index > 10000) {
+            VkQueue queue;
+            inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
             inst->vkDestroyDevice(device, tracker.get());
             break;
         }
@@ -755,9 +761,7 @@ TEST(Allocation, CreateInstanceDeviceIntentionalAllocFail) {
             ASSERT_EQ(family.timestampValidBits, 0U);
 
             DeviceCreateInfo dev_create_info;
-            DeviceQueueCreateInfo queue_info;
-            queue_info.add_priority(0.0f);
-            dev_create_info.add_device_queue(queue_info);
+            dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
             VkDevice device;
             result = env.vulkan_functions.vkCreateDevice(physical_devices.at(i), dev_create_info.get(), tracker.get(), &device);
@@ -766,6 +770,9 @@ TEST(Allocation, CreateInstanceDeviceIntentionalAllocFail) {
             }
             ASSERT_EQ(result, VK_SUCCESS);
 
+            VkQueue queue;
+            env.vulkan_functions.vkGetDeviceQueue(device, 0, 0, &queue);
+
             env.vulkan_functions.vkDestroyDevice(device, tracker.get());
         }
         env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
@@ -897,11 +904,14 @@ TEST(Allocation, EnumeratePhysicalDevicesIntentionalAllocFail) {
             ASSERT_EQ(family.timestampValidBits, 0U);
 
             DeviceCreateInfo dev_create_info;
-            DeviceQueueCreateInfo queue_info;
-            queue_info.add_priority(0.0f);
-            dev_create_info.add_device_queue(queue_info);
+            dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
             result = env.vulkan_functions.vkCreateDevice(physical_devices[i], dev_create_info.get(), tracker.get(), &devices[i]);
+
+            VkQueue queue;
+            if (result == VK_SUCCESS) {
+                env.vulkan_functions.vkGetDeviceQueue(devices[i], 0, 0, &queue);
+            }
         }
         for (uint32_t i = 0; i < returned_physical_count; i++) {
             if (result == VK_SUCCESS) {
@@ -993,13 +1003,14 @@ TEST(Allocation, CreateInstanceDeviceWithDXGIDriverIntentionalAllocFail) {
             ASSERT_EQ(family.timestampValidBits, 0U);
 
             DeviceCreateInfo dev_create_info;
-            DeviceQueueCreateInfo queue_info;
-            queue_info.add_priority(0.0f);
-            dev_create_info.add_device_queue(queue_info);
+            dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
             result = env.vulkan_functions.vkCreateDevice(physical_devices[i], dev_create_info.get(), tracker.get(), &devices[i]);
             if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
                 devices[i] = VK_NULL_HANDLE;
+            } else {
+                VkQueue queue;
+                env.vulkan_functions.vkGetDeviceQueue(devices[i], 0, 0, &queue);
             }
         }
         for (uint32_t i = 0; i < returned_physical_count; i++) {
index 76a3a27eeee5ee6335f323b00f863bb7841a667b..115b2fc00b4284267cad6b6bd89c6581bca54e71 100644 (file)
@@ -77,7 +77,6 @@ TEST(GetProcAddr, VerifyGetDeviceProcAddr) {
     ASSERT_EQ(gdpa_loader, gdpa_inst_queried);
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_dev);
 
     PFN_vkGetDeviceProcAddr gdpa_dev_queried = dev.load("vkGetDeviceProcAddr");
@@ -204,7 +203,6 @@ TEST(GetDeviceProcAddr, SwapchainFuncsWithTerminator) {
     auto phys_dev = inst.GetPhysDev();
     {
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
         DeviceFunctions dev_funcs{env.vulkan_functions, dev};
 
@@ -249,7 +247,6 @@ TEST(GetDeviceProcAddr, SwapchainFuncsWithTerminator) {
 
         DeviceWrapper dev{inst};
         dev.create_info.add_extensions({"VK_KHR_swapchain", "VK_KHR_display_swapchain", "VK_EXT_debug_marker"});
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
         DeviceFunctions dev_funcs{env.vulkan_functions, dev};
 
index e0bb3c61a1820f14b37664e767cb749867ccd5f4..84709f191c3d0df5f89a0b1ff18fbacf1de3ba55 100644 (file)
@@ -1583,8 +1583,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingAndroidSurface) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1617,8 +1615,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingDirectFBSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1651,8 +1647,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingFuchsiaSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1685,8 +1679,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingGGPSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1719,8 +1711,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingIOSSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1753,8 +1743,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingMacOSSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI("VK_USE_PLATFORM_MACOS_MVK");
@@ -1787,8 +1775,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingMetalSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI("VK_USE_PLATFORM_METAL_EXT");
@@ -1821,8 +1807,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingQNXSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1855,8 +1839,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingViNNSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1889,8 +1871,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingWaylandSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI("VK_USE_PLATFORM_WAYLAND_KHR");
@@ -1923,8 +1903,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingWin32Surf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1957,8 +1935,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingXCBSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI();
@@ -1993,8 +1969,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingXlibSurf) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.setup_WSI("VK_USE_PLATFORM_XLIB_KHR");
@@ -2039,8 +2013,6 @@ TEST(LoaderHandleValidTests, VerifyHandleWrappingDebugUtilsMessenger) {
                            "wrap_objects_layer.json");
 
     driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.add_extension("VK_EXT_debug_utils");
index 58fbff0bd1f431fc878e68656f97ddb4242025ea..08184b3ac06a422d62d4c82b00bcf1f8e0897a04 100644 (file)
@@ -1995,10 +1995,7 @@ TEST(ExplicitLayers, WrapObjects) {
             ManifestLayer::LayerDescription{}.set_name(regular_layer_name_2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_layer_2.json");
 
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
     {  // just the wrap layer
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.add_layer(wrap_objects_name);
@@ -2006,7 +2003,6 @@ TEST(ExplicitLayers, WrapObjects) {
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
     {  // wrap layer first
@@ -2016,7 +2012,6 @@ TEST(ExplicitLayers, WrapObjects) {
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
     {  // wrap layer last
@@ -2026,7 +2021,6 @@ TEST(ExplicitLayers, WrapObjects) {
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
     {  // wrap layer last
@@ -2036,7 +2030,6 @@ TEST(ExplicitLayers, WrapObjects) {
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
 }
@@ -2460,10 +2453,7 @@ TEST(LayerExtensions, ImplicitNoAdditionalInstanceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2505,10 +2495,7 @@ TEST(LayerExtensions, ImplicitDirDispModeInstanceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2554,10 +2541,7 @@ TEST(LayerExtensions, ImplicitDispSurfCountInstanceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2600,10 +2584,7 @@ TEST(LayerExtensions, ImplicitBothInstanceExtensions) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2650,10 +2631,7 @@ TEST(LayerExtensions, ExplicitNoAdditionalInstanceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2685,10 +2663,7 @@ TEST(LayerExtensions, ExplicitDirDispModeInstanceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2733,10 +2708,7 @@ TEST(LayerExtensions, ExplicitDispSurfCountInstanceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -2781,10 +2753,7 @@ TEST(LayerExtensions, ExplicitBothInstanceExtensions) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2846,10 +2815,7 @@ TEST(LayerExtensions, ImplicitNoAdditionalDeviceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2898,7 +2864,6 @@ TEST(LayerExtensions, ImplicitNoAdditionalDeviceExtension) {
     handle_assert_has_value(pfn_vkSetDeviceMemoryPriority);
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_dev);
 
     // Query again after create device to make sure the value returned by vkGetInstanceProcAddr did not change
@@ -2924,10 +2889,7 @@ TEST(LayerExtensions, ImplicitMaintenanceDeviceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2970,7 +2932,7 @@ TEST(LayerExtensions, ImplicitMaintenanceDeviceExtension) {
     ASSERT_EQ(true, found);
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -2982,10 +2944,7 @@ TEST(LayerExtensions, ImplicitPresentImageDeviceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -3028,8 +2987,7 @@ TEST(LayerExtensions, ImplicitPresentImageDeviceExtension) {
     ASSERT_EQ(true, found);
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3041,10 +2999,7 @@ TEST(LayerExtensions, ImplicitBothDeviceExtensions) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -3091,9 +3046,7 @@ TEST(LayerExtensions, ImplicitBothDeviceExtensions) {
     }
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
-        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3105,10 +3058,7 @@ TEST(LayerExtensions, ExplicitNoAdditionalDeviceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3128,7 +3078,6 @@ TEST(LayerExtensions, ExplicitNoAdditionalDeviceExtension) {
     ASSERT_NO_FATAL_FAILURE(inst.EnumerateLayerDeviceExtensions(phys_dev, explicit_layer_name, 0));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_dev);
 
     // Make sure all the function pointers are NULL as well
@@ -3141,10 +3090,7 @@ TEST(LayerExtensions, ExplicitMaintenanceDeviceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3168,7 +3114,7 @@ TEST(LayerExtensions, ExplicitMaintenanceDeviceExtension) {
     ASSERT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3180,10 +3126,7 @@ TEST(LayerExtensions, ExplicitPresentImageDeviceExtension) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3208,8 +3151,7 @@ TEST(LayerExtensions, ExplicitPresentImageDeviceExtension) {
     ASSERT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3221,10 +3163,7 @@ TEST(LayerExtensions, ExplicitBothDeviceExtensions) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3252,9 +3191,7 @@ TEST(LayerExtensions, ExplicitBothDeviceExtensions) {
     ASSERT_TRUE(string_eq(layer_extensions.at(1).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
-        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3450,7 +3387,6 @@ TEST(TestLayers, InstEnvironEnableExplicitLayer) {
 
     // Create a device and query the function pointers
     DeviceWrapper dev1{inst1};
-    dev1.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev1.CheckCreate(phys_dev1);
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolBefore = dev1.load("vkTrimCommandPoolKHR");
     PFN_vkGetSwapchainStatusKHR pfn_GetSwapchainStatusBefore = dev1.load("vkGetSwapchainStatusKHR");
@@ -3472,8 +3408,7 @@ TEST(TestLayers, InstEnvironEnableExplicitLayer) {
 
     DeviceWrapper dev2{inst2};
     dev2.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
-        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev2.CheckCreate(phys_dev2);
 
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolAfter = dev2.load("vkTrimCommandPoolKHR");
@@ -4469,7 +4404,6 @@ TEST(TestLayers, DoNotUseDeviceLayer) {
 
     // Create a device and query the function pointers
     DeviceWrapper dev1{inst1};
-    dev1.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev1.CheckCreate(phys_dev1);
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolBefore = dev1.load("vkTrimCommandPoolKHR");
     PFN_vkGetSwapchainStatusKHR pfn_GetSwapchainStatusBefore = dev1.load("vkGetSwapchainStatusKHR");
@@ -4496,12 +4430,11 @@ TEST(TestLayers, DoNotUseDeviceLayer) {
     DeviceWrapper dev2{inst2};
     dev2.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
         .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f))
         .add_layer(explicit_layer_name);
     dev2.CheckCreate(phys_dev2, VK_ERROR_EXTENSION_NOT_PRESENT);
 
     DeviceWrapper dev3{inst2};
-    dev3.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f)).add_layer(explicit_layer_name);
+    dev3.create_info.add_layer(explicit_layer_name);
     dev3.CheckCreate(phys_dev2);
 
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolAfter = dev3.load("vkTrimCommandPoolKHR");
@@ -4539,7 +4472,6 @@ TEST(TestLayers, InstanceAndDeviceLayer) {
     DeviceWrapper dev{inst};
     dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
         .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f))
         .add_layer(explicit_layer_name);
     dev.CheckCreate(phys_dev);
 
index 1730dd33f290201c370fcd8d678526b086d80444..27aedf833ebb41463ff6ac44ee1b7deca9cf9949 100644 (file)
@@ -1177,28 +1177,15 @@ TEST(CreateDevice, ExtensionNotPresent) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& driver = env.get_test_icd();
-
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
 
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t familyCount = 0;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, nullptr);
-    ASSERT_EQ(familyCount, 1U);
-
-    VkQueueFamilyProperties families;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, &families);
-    ASSERT_EQ(familyCount, 1U);
-    ASSERT_EQ(families, family_props.properties);
-
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension("NotPresent").add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension("NotPresent");
 
     dev.CheckCreate(phys_dev, VK_ERROR_EXTENSION_NOT_PRESENT);
 }
@@ -1210,28 +1197,15 @@ TEST(CreateDevice, LayersNotPresent) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& driver = env.get_test_icd();
-
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
 
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t familyCount = 0;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, nullptr);
-    ASSERT_EQ(familyCount, 1U);
-
-    VkQueueFamilyProperties families;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, &families);
-    ASSERT_EQ(familyCount, 1U);
-    ASSERT_EQ(families, family_props.properties);
-
     DeviceWrapper dev{inst};
-    dev.create_info.add_layer("NotPresent").add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_layer("NotPresent");
 
     dev.CheckCreate(phys_dev);
 }
@@ -1257,7 +1231,7 @@ TEST(CreateDevice, MatchInstanceAndDeviceLayers) {
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_layer(layer_name).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_layer(layer_name);
 
     dev.CheckCreate(phys_dev);
 }
@@ -1288,7 +1262,7 @@ TEST(CreateDevice, UnmatchInstanceAndDeviceLayers) {
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_layer(layer_name).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_layer(layer_name);
 
     dev.CheckCreate(phys_dev);
 
@@ -1324,7 +1298,7 @@ TEST(CreateDevice, CheckCopyOfInstanceLayerNames) {
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_layer(layer_name).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_layer(layer_name);
 
     dev.CheckCreate(phys_dev);
 }
@@ -1334,10 +1308,8 @@ TEST(CreateDevice, ConsecutiveCreate) {
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& driver = env.get_test_icd();
 
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
     for (uint32_t i = 0; i < 100; i++) {
         driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices.back().queue_family_properties.push_back(family_props);
     }
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -1345,7 +1317,6 @@ TEST(CreateDevice, ConsecutiveCreate) {
     auto phys_devs = inst.GetPhysDevs(100);
     for (uint32_t i = 0; i < 100; i++) {
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_devs[i]);
     }
 }
@@ -1355,10 +1326,8 @@ TEST(CreateDevice, ConsecutiveCreateWithoutDestruction) {
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& driver = env.get_test_icd();
 
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
     for (uint32_t i = 0; i < 100; i++) {
         driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices.back().queue_family_properties.push_back(family_props);
     }
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -1369,7 +1338,6 @@ TEST(CreateDevice, ConsecutiveCreateWithoutDestruction) {
     for (uint32_t i = 0; i < 100; i++) {
         devices.emplace_back(inst);
         DeviceWrapper& dev = devices.back();
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         dev.CheckCreate(phys_devs[i]);
     }
@@ -4056,7 +4024,6 @@ TEST(LayerCreatesDevice, Basic) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().queue_family_properties.push_back({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true});
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name("implicit_layer_name")
@@ -4076,7 +4043,6 @@ TEST(LayerCreatesDevice, Basic) {
     inst.CheckCreate();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(inst.GetPhysDev());
 }
 
@@ -4084,10 +4050,8 @@ TEST(LayerCreatesDevice, DifferentPhysicalDevice) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     env.get_test_icd(0).physical_devices.emplace_back("Device0");
-    env.get_test_icd(0).physical_devices.back().queue_family_properties.push_back({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true});
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     env.get_test_icd(1).physical_devices.emplace_back("Device1");
-    env.get_test_icd(1).physical_devices.back().queue_family_properties.push_back({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true});
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name("implicit_layer_name")
@@ -4109,19 +4073,13 @@ TEST(LayerCreatesDevice, DifferentPhysicalDevice) {
     auto phys_devs = inst.GetPhysDevs();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_devs.at(0));
-
-    uint32_t familyCount = 0;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_devs.at(0), &familyCount, nullptr);
-    ASSERT_EQ(familyCount, 1U);
 }
 
 TEST(Layer, pfnNextGetInstanceProcAddr_should_not_return_layers_own_functions) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     env.get_test_icd(0).physical_devices.emplace_back("Device0");
-    env.get_test_icd(0).physical_devices.back().queue_family_properties.push_back({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true});
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name("implicit_layer_name")
@@ -4136,10 +4094,5 @@ TEST(Layer, pfnNextGetInstanceProcAddr_should_not_return_layers_own_functions) {
     auto phys_devs = inst.GetPhysDevs();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_devs.at(0));
-
-    uint32_t familyCount = 0;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_devs.at(0), &familyCount, nullptr);
-    ASSERT_EQ(familyCount, 1U);
 }
index 406a240dbf7bfd496732586d1c32a9cb2fffd90c..d61c6221e1661489a37be5829fac57a7d788c6f8 100644 (file)
@@ -45,7 +45,6 @@ void create_destroy_instance_loop_with_function_queries(FrameworkEnvironment* en
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(1.0));
         dev.CheckCreate(phys_dev);
         for (uint32_t j = 0; j < num_loops_try_get_device_proc_addr; j++) {
             PFN_vkCmdBindPipeline p = dev.load("vkCmdBindPipeline");
@@ -61,7 +60,6 @@ void create_destroy_device_loop(FrameworkEnvironment* env, uint32_t num_loops_cr
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
     for (uint32_t i = 0; i < num_loops_create_destroy_device; i++) {
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(1.0));
         dev.CheckCreate(phys_dev);
 
         for (uint32_t j = 0; j < num_loops_try_get_proc_addr; j++) {
index b5f97bdbb5a77485233fdfce63516165c628e9e7..4e2a20e8d630b4e7ebe40f93d44fb5f75abdf0c8 100644 (file)
@@ -661,7 +661,6 @@ void unknown_function_test_impl(std::vector<TestConfig> const& flags) {
 
     auto& driver = env.get_test_icd();
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().add_queue_family_properties({});
 
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
index 772c1639015ad00c4a2647af87d9c28c7fdde195..aaa70aa8d8b02a03cc9f32bfe9b87b4bff94ad79 100644 (file)
@@ -783,10 +783,8 @@ TEST(WsiTests, ForgetEnableSurfaceExtensions) {
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& driver = env.get_test_icd();
     driver.setup_WSI();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
 
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
     driver.physical_devices.back().add_extension("VK_KHR_swapchain");
 
     InstWrapper inst{env.vulkan_functions};
@@ -802,10 +800,8 @@ TEST(WsiTests, SwapchainFunctional) {
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& driver = env.get_test_icd();
     driver.setup_WSI();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
 
     driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
     driver.physical_devices.back().add_extension("VK_KHR_swapchain");
 
     InstWrapper inst{env.vulkan_functions};
@@ -818,7 +814,6 @@ TEST(WsiTests, SwapchainFunctional) {
     {  // Use GDPA to get functions
         DeviceWrapper dev{inst};
         dev.create_info.add_extension("VK_KHR_swapchain");
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
 
@@ -837,7 +832,6 @@ TEST(WsiTests, SwapchainFunctional) {
     {  // Use GIPA gotten functions
         DeviceWrapper dev{inst};
         dev.create_info.add_extension("VK_KHR_swapchain");
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
 
@@ -872,7 +866,6 @@ TEST(WsiTests, SwapchainFunctional) {
     {  // forget to set the surface
         DeviceWrapper dev{inst};
         dev.create_info.add_extension("VK_KHR_swapchain");
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         dev.CheckCreate(phys_dev);