return "Drivers";
}
-std::string override_base_path(uint32_t random_base_path) {
- return std::string("SOFTWARE\\LoaderRegressionTests_") + std::to_string(random_base_path);
-}
-
-std::string get_override_path(HKEY root_key, uint32_t random_base_path) {
- std::string override_path = override_base_path(random_base_path);
-
- if (root_key == HKEY_CURRENT_USER) {
- override_path += "\\HKCU";
- } else if (root_key == HKEY_LOCAL_MACHINE) {
- override_path += "\\HKLM";
- }
- return override_path;
-}
-
-HKEY create_key(HKEY key_root, const char* key_path) {
- DWORD dDisposition{};
- HKEY key{};
- LSTATUS out =
- RegCreateKeyExA(key_root, key_path, NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &dDisposition);
- if (out != ERROR_SUCCESS) std::cerr << win_api_error_str(out) << " failed to create key " << key << " at " << key_path << "\n";
- return key;
-}
-
-void close_key(HKEY key) {
- LSTATUS out = RegCloseKey(key);
- if (out != ERROR_SUCCESS) std::cerr << win_api_error_str(out) << " failed to close key " << key << "\n";
-}
-
-void delete_key(HKEY key, const char* key_path, bool report_failure = true) {
- LSTATUS out = RegDeleteKeyA(key, key_path);
- if (out != ERROR_SUCCESS)
- if (report_failure)
- std::cerr << win_api_error_str(out) << " failed to close key " << key << " with path " << key_path << "\n";
-}
-
-void setup_override_key(HKEY root_key, uint32_t random_base_path) {
- DWORD dDisposition{};
- LSTATUS out;
-
- auto override_path = get_override_path(root_key, random_base_path);
- HKEY override_key;
- out = RegCreateKeyExA(HKEY_CURRENT_USER, override_path.c_str(), NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL,
- &override_key, &dDisposition);
- if (out != ERROR_SUCCESS)
- std::cerr << win_api_error_str(out) << " failed to create key " << override_key << " with path " << override_path << "\n";
-
- out = RegOverridePredefKey(root_key, override_key);
- if (out != ERROR_SUCCESS) std::cerr << win_api_error_str(out) << " failed to override key " << override_key << "\n";
-
- close_key(override_key);
-}
-void revert_override(HKEY root_key, uint32_t random_base_path) {
- LSTATUS out = RegOverridePredefKey(root_key, NULL);
- if (out != ERROR_SUCCESS) std::cerr << win_api_error_str(out) << " failed to revert override key " << root_key << "\n";
-
- auto override_path = get_override_path(root_key, random_base_path);
- out = RegDeleteTreeA(HKEY_CURRENT_USER, override_path.c_str());
- if (out != ERROR_SUCCESS) print_error_message(out, "RegDeleteTreeA", std::string("Key") + override_path);
-}
-
-KeyWrapper::KeyWrapper(HKEY key) noexcept : key(key) {}
-KeyWrapper::KeyWrapper(HKEY key_root, const char* key_path) noexcept { key = create_key(key_root, key_path); }
-KeyWrapper::~KeyWrapper() noexcept {
- if (key != NULL) close_key(key);
-}
-KeyWrapper::KeyWrapper(KeyWrapper&& other) noexcept : key(other.key) { other.key = NULL; };
-KeyWrapper& KeyWrapper::operator=(KeyWrapper&& other) noexcept {
- if (this != &other) {
- if (key != NULL) close_key(key);
- key = other.key;
- other.key = NULL;
- }
- return *this;
-};
-
-void add_key_value(HKEY const& key, fs::path const& manifest_path, bool enabled = true) {
- DWORD value = enabled ? 0 : 1;
- LSTATUS out = RegSetValueEx(key, manifest_path.c_str(), 0, REG_DWORD, reinterpret_cast<const BYTE*>(&value), sizeof(value));
- if (out != ERROR_SUCCESS) std::cerr << win_api_error_str(out) << " failed to set key value for " << manifest_path.str() << "\n";
-}
-
-void add_key_value_string(HKEY const& key, const char* name, const char* str) {
- LSTATUS out = RegSetValueExA(key, name, 0, REG_SZ, reinterpret_cast<const BYTE*>(str), static_cast<DWORD>(strlen(str)));
- if (out != ERROR_SUCCESS)
- std::cerr << win_api_error_str(out) << " failed to set string value for " << name << ":" << str << "\n";
-}
-
-void remove_key_value(HKEY const& key, fs::path const& manifest_path) {
- LSTATUS out = RegDeleteValueA(key, manifest_path.c_str());
- if (out != ERROR_SUCCESS)
- std::cerr << win_api_error_str(out) << " failed to delete key value for " << manifest_path.str() << "\n";
-}
-
-uint32_t setup_override(DebugMode debug_mode) {
- uint32_t random_base_path = 0;
- std::random_device rd;
- std::ranlux48 gen(rd());
- std::uniform_int_distribution<uint32_t> dist(0, 2000000);
- while (random_base_path == 0) {
- uint32_t random_num = dist(gen);
- auto override_path = get_override_path(HKEY_CURRENT_USER, random_num);
- HKEY temp_key = NULL;
- auto result = RegOpenKeyEx(HKEY_CURRENT_USER, override_path.c_str(), 0, KEY_READ, &temp_key);
- if (result != ERROR_SUCCESS) {
- // Didn't find it, use the random number
- random_base_path = random_num;
- } else {
- // try a different random number that isn't being used
- std::cout << "INFO: Encountered existing registry key, is the registry full of old LoaderRegressionTest keys?\n";
- }
- }
- auto reg_base = override_base_path(random_base_path);
- HKEY timestamp_key = create_key(HKEY_CURRENT_USER, reg_base.c_str());
-
- std::time_t cur_time = std::time(nullptr);
- char mbstr[100];
- tm time_buf{};
- localtime_s(&time_buf, &cur_time);
- if (std::strftime(mbstr, sizeof(mbstr), "%A %c", &time_buf)) {
- add_key_value_string(timestamp_key, "Timestamp", mbstr);
- }
-
- setup_override_key(HKEY_LOCAL_MACHINE, random_base_path);
- setup_override_key(HKEY_CURRENT_USER, random_base_path);
- return random_base_path;
-}
-void clear_override(DebugMode debug_mode, uint32_t random_base_path) {
- if (debug_mode != DebugMode::no_delete) {
- revert_override(HKEY_CURRENT_USER, random_base_path);
- revert_override(HKEY_LOCAL_MACHINE, random_base_path);
-
- LSTATUS out = RegDeleteKeyA(HKEY_CURRENT_USER, override_base_path(random_base_path).c_str());
- if (out != ERROR_SUCCESS)
- print_error_message(out, "RegDeleteKeyA", std::string("Key") + override_base_path(random_base_path).c_str());
- }
-}
void PlatformShim::reset(DebugMode debug_mode) {
- delete_key(HKEY_CURRENT_USER, "SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers", false);
- delete_key(HKEY_CURRENT_USER, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers", false);
-
- delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers", false);
- delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers", false);
- delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\Drivers", false);
-
- delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Khronos\\Vulkan\\Drivers", false);
- delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Khronos\\Vulkan\\ExplicitLayers", false);
- delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Khronos\\Vulkan\\ImplicitLayers", false);
+ hkey_current_user_explicit_layers.clear();
+ hkey_current_user_implicit_layers.clear();
+ hkey_local_machine_explicit_layers.clear();
+ hkey_local_machine_implicit_layers.clear();
+ hkey_local_machine_drivers.clear();
}
void PlatformShim::set_path(ManifestCategory category, fs::path const& path) {}
void PlatformShim::add_manifest(ManifestCategory category, fs::path const& path) {
- std::string reg_path = std::string("SOFTWARE\\Khronos\\Vulkan\\") + category_path_name(category);
- KeyWrapper key{HKEY_LOCAL_MACHINE, reg_path.c_str()};
- add_key_value(key, path);
- if (category == ManifestCategory::icd) {
- icd_paths.push_back(path);
- }
+ if (category == ManifestCategory::implicit_layer) hkey_local_machine_implicit_layers.emplace_back(path.str());
+ if (category == ManifestCategory::explicit_layer)
+ hkey_local_machine_explicit_layers.emplace_back(path.str());
+ else
+ hkey_local_machine_drivers.emplace_back(path.str());
}
void PlatformShim::add_dxgi_adapter(fs::path const& manifest_path, GpuType gpu_preference, uint32_t known_driver_index,
DXGI_ADAPTER_DESC1 desc1) {
d3dkmt_adapters.push_back({adapter, path});
}
+// TODO:
void PlatformShim::add_CM_Device_ID(std::wstring const& id, fs::path const& icd_path, fs::path const& layer_path) {
- // append a null byte as separator if there is already id's in the list
- if (CM_device_ID_list.size() != 0) {
- CM_device_ID_list += L'\0'; // I'm sure this wont cause issues with std::string down the line... /s
- }
- CM_device_ID_list += id;
- std::string id_str(id.length(), '\0');
- size_t size_written{};
- wcstombs_s(&size_written, &id_str[0], id_str.length(), id.c_str(), id.length());
-
- std::string device_path = std::string(pnp_registry_path) + "\\" + id_str;
- CM_device_ID_registry_keys.emplace_back(HKEY_LOCAL_MACHINE, device_path.c_str());
- HKEY id_key = CM_device_ID_registry_keys.back().key;
- add_key_value_string(id_key, "VulkanDriverName", icd_path.c_str());
- add_key_value_string(id_key, "VulkanLayerName", layer_path.c_str());
- // TODO: decide how to handle 32 bit
- // add_key_value_string(id_key, "VulkanDriverNameWoW", icd_path.c_str());
- // add_key_value_string(id_key, "VulkanLayerName", layer_path.c_str());
-}
-
-void PlatformShim::redirect_category(fs::path const& new_path, ManifestCategory search_category) {
- switch (search_category) {
- case (ManifestCategory::implicit_layer):
- create_key(HKEY_CURRENT_USER, "SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers");
- create_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers");
- create_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Khronos\\Vulkan\\ImplicitLayers");
- break;
- case (ManifestCategory::explicit_layer):
- create_key(HKEY_CURRENT_USER, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers");
- create_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers");
- create_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Khronos\\Vulkan\\ExplicitLayers");
- break;
- case (ManifestCategory::icd):
- create_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\Drivers");
- create_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Khronos\\Vulkan\\Drivers");
- break;
- }
-}
+ // // append a null byte as separator if there is already id's in the list
+ // if (CM_device_ID_list.size() != 0) {
+ // CM_device_ID_list += L'\0'; // I'm sure this wont cause issues with std::string down the line... /s
+ // }
+ // CM_device_ID_list += id;
+ // std::string id_str(id.length(), '\0');
+ // size_t size_written{};
+ // wcstombs_s(&size_written, &id_str[0], id_str.length(), id.c_str(), id.length());
+
+ // std::string device_path = std::string(pnp_registry_path) + "\\" + id_str;
+ // CM_device_ID_registry_keys.push_back(device_path.c_str());
+ // add_key_value_string(id_key, "VulkanDriverName", icd_path.c_str());
+ // add_key_value_string(id_key, "VulkanLayerName", layer_path.c_str());
+ // // TODO: decide how to handle 32 bit
+ // // add_key_value_string(id_key, "VulkanDriverNameWoW", icd_path.c_str());
+ // // add_key_value_string(id_key, "VulkanLayerName", layer_path.c_str());
+}
+
+void PlatformShim::redirect_category(fs::path const& new_path, ManifestCategory search_category) {}
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
return "icd.d";
}
-void PlatformShim::setup_override(DebugMode debug_mode) {}
-void PlatformShim::clear_override(DebugMode debug_mode) {}
void PlatformShim::reset(DebugMode debug_mode) { redirection_map.clear(); }
void PlatformShim::redirect_path(fs::path const& path, fs::path const& new_path) { redirection_map[path.str()] = new_path; }
VkInstance bad_instance = (VkInstance)(&my_bad_data);
uint32_t returned_physical_count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkEnumeratePhysicalDevices(bad_instance, &returned_physical_count, nullptr), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkEnumeratePhysicalDevices(bad_instance, &returned_physical_count, nullptr),
+ "vkEnumeratePhysicalDevices: Invalid instance \\[VUID-vkEnumeratePhysicalDevices-instance-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadInstGetInstProcAddr) {
} my_bad_data;
VkInstance bad_instance = (VkInstance)(&my_bad_data);
- ASSERT_DEATH(env->vulkan_functions.vkGetInstanceProcAddr(bad_instance, "vkGetBufferDeviceAddress"), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetInstanceProcAddr(bad_instance, "vkGetBufferDeviceAddress"),
+ "vkGetInstanceProcAddr: Invalid instance \\[VUID-vkGetInstanceProcAddr-instance-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadInstDestroyInstance) {
} my_bad_data;
VkInstance bad_instance = (VkInstance)(&my_bad_data);
- ASSERT_DEATH(env->vulkan_functions.vkDestroyInstance(bad_instance, nullptr), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkDestroyInstance(bad_instance, nullptr),
+ "vkDestroyInstance: Invalid instance \\[VUID-vkDestroyInstance-instance-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadInstDestroySurface) {
} my_bad_data;
VkInstance bad_instance = (VkInstance)(&my_bad_data);
- ASSERT_DEATH(env->vulkan_functions.vkDestroySurfaceKHR(bad_instance, VK_NULL_HANDLE, nullptr), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkDestroySurfaceKHR(bad_instance, VK_NULL_HANDLE, nullptr),
+ "vkDestroySurfaceKHR: Invalid instance \\[VUID-vkDestroySurfaceKHR-instance-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadInstCreateHeadlessSurf) {
surf_create_info.sType = VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateHeadlessSurfaceEXT(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateHeadlessSurfaceEXT(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateHeadlessSurfaceEXT: Invalid instance \\[VUID-vkCreateHeadlessSurfaceEXT-instance-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadInstCreateDisplayPlaneSurf) {
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
ASSERT_DEATH(env->vulkan_functions.vkCreateDisplayPlaneSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface),
- "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ "vkCreateDisplayPlaneSurfaceKHR: Invalid instance \\[VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter\\]");
}
#ifdef VK_USE_PLATFORM_ANDROID_KHR
surf_create_info.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateAndroidSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateAndroidSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateAndroidSurfaceKHR: Invalid instance \\[VUID-vkCreateAndroidSurfaceKHR-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_ANDROID_KHR
surf_create_info.sType = VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateDirectFBSurfaceEXT(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateDirectFBSurfaceEXT(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateDirectFBSurfaceEXT: Invalid instance \\[VUID-vkCreateDirectFBSurfaceEXT-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_DIRECTFB_EXT
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
ASSERT_DEATH(env->vulkan_functions.vkCreateImagePipeSurfaceFUCHSIA(bad_instance, &surf_create_info, nullptr, &created_surface),
- "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ "vkCreateImagePipeSurfaceFUCHSIA: Invalid instance \\[VUID-vkCreateImagePipeSurfaceFUCHSIA-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_FUCHSIA
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
ASSERT_DEATH(
- env->vulkan_functions.vkCreateStreamDescriptorSurfaceGGP(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ env->vulkan_functions.vkCreateStreamDescriptorSurfaceGGP(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateStreamDescriptorSurfaceGGP: Invalid instance \\[VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_GGP
surf_create_info.sType = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateIOSSurfaceMVK(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateIOSSurfaceMVK(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateIOSSurfaceMVK: Invalid instance \\[VUID-vkCreateIOSSurfaceMVK-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_IOS_MVK
surf_create_info.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateMacOSSurfaceMVK(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateMacOSSurfaceMVK(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateMacOSSurfaceMVK: Invalid instance \\[VUID-vkCreateMacOSSurfaceMVK-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_MACOS_MVK
surf_create_info.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateMetalSurfaceEXT(bad_instance, &surf_create_info, nullptr, &created_surface), "");
- // TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateMetalSurfaceEXT(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateMetalSurfaceEXT: Invalid instance \\[VUID-vkCreateMetalSurfaceEXT-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_METAL_EXT
surf_create_info.sType = VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateScreenSurfaceQNX(bad_instance, &surf_create_info, nullptr, &created_surface), "");
+ ASSERT_DEATH(env->vulkan_functions.vkCreateScreenSurfaceQNX(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateScreenSurfaceQNX: Invalid instance \\[VUID-vkCreateScreenSurfaceQNX-instance-parameter\\]");
// TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
}
#endif // VK_USE_PLATFORM_SCREEN_QNX
surf_create_info.sType = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.CreateViSurfaceNN(bad_instance, &surf_create_info, nullptr, &created_surface), "");
+ ASSERT_DEATH(env->vulkan_functions.vkCreateViSurfaceNN(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateViSurfaceNN: Invalid instance \\[VUID-vkCreateViSurfaceNN-instance-parameter\\]");
// TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
}
#endif // VK_USE_PLATFORM_VI_NN
surf_create_info.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateWaylandSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface), "");
+ ASSERT_DEATH(env->vulkan_functions.vkCreateWaylandSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateWaylandSurfaceKHR: Invalid instance \\[VUID-vkCreateWaylandSurfaceKHR-instance-parameter\\]");
// TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
}
#endif // VK_USE_PLATFORM_WAYLAND_KHR
surf_create_info.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateWin32SurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface), "");
+ ASSERT_DEATH(env->vulkan_functions.vkCreateWin32SurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateWin32SurfaceKHR: Invalid instance \\[VUID-vkCreateWin32SurfaceKHR-instance-parameter\\]");
// TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
}
#endif // VK_USE_PLATFORM_WIN32_KHR
surf_create_info.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateXcbSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface), "");
+ ASSERT_DEATH(env->vulkan_functions.vkCreateXcbSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateXcbSurfaceKHR: Invalid instance \\[VUID-vkCreateXcbSurfaceKHR-instance-parameter\\]");
// TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
}
#endif // VK_USE_PLATFORM_XCB_KHR
surf_create_info.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
surf_create_info.pNext = nullptr;
VkSurfaceKHR created_surface = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateXlibSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface), "");
+ ASSERT_DEATH(env->vulkan_functions.vkCreateXlibSurfaceKHR(bad_instance, &surf_create_info, nullptr, &created_surface),
+ "vkCreateXlibSurfaceKHR: Invalid instance \\[VUID-vkCreateXlibSurfaceKHR-instance-parameter\\]");
// TODO: Look for "invalid instance" in stderr log to make sure correct error is thrown
}
#endif // VK_USE_PLATFORM_XLIB_KHR
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VkPhysicalDeviceFeatures features = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceFeatures(bad_physical_dev, &features), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(
+ env->vulkan_functions.vkGetPhysicalDeviceFeatures(bad_physical_dev, &features),
+ "vkGetPhysicalDeviceFeatures: Invalid physicalDevice \\[VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevFormatProps) {
VkFormatProperties format_info = {};
ASSERT_DEATH(
- env->vulkan_functions.vkGetPhysicalDeviceFormatProperties(bad_physical_dev, VK_FORMAT_R8G8B8A8_UNORM, &format_info), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ env->vulkan_functions.vkGetPhysicalDeviceFormatProperties(bad_physical_dev, VK_FORMAT_R8G8B8A8_UNORM, &format_info),
+ "vkGetPhysicalDeviceFormatProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceFormatProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevImgFormatProps) {
ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceImageFormatProperties(bad_physical_dev, VK_FORMAT_R8G8B8A8_UNORM,
VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_LINEAR,
VK_IMAGE_USAGE_STORAGE_BIT, 0, &format_info),
- "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ "vkGetPhysicalDeviceImageFormatProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevProps) {
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VkPhysicalDeviceProperties properties = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceProperties(bad_physical_dev, &properties), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(
+ env->vulkan_functions.vkGetPhysicalDeviceProperties(bad_physical_dev, &properties),
+ "vkGetPhysicalDeviceProperties: Invalid physicalDevice \\[VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevQueueFamProps) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceQueueFamilyProperties(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceQueueFamilyProperties(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceQueueFamilyProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceQueueFamilyProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevDevMemProps) {
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VkPhysicalDeviceMemoryProperties properties = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceMemoryProperties(bad_physical_dev, &properties), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceMemoryProperties(bad_physical_dev, &properties),
+ "vkGetPhysicalDeviceMemoryProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevCreateDevice) {
dev_create_info.ppEnabledExtensionNames = nullptr;
dev_create_info.pEnabledFeatures = nullptr;
VkDevice created_dev = VK_NULL_HANDLE;
- ASSERT_DEATH(env->vulkan_functions.vkCreateDevice(bad_physical_dev, &dev_create_info, nullptr, &created_dev), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkCreateDevice(bad_physical_dev, &dev_create_info, nullptr, &created_dev),
+ "vkCreateDevice: Invalid physicalDevice \\[VUID-vkCreateDevice-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevEnumDevExtProps) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkEnumerateDeviceExtensionProperties(bad_physical_dev, nullptr, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkEnumerateDeviceExtensionProperties(bad_physical_dev, nullptr, &count, nullptr),
+ "vkEnumerateDeviceExtensionProperties: Invalid physicalDevice "
+ "\\[VUID-vkEnumerateDeviceExtensionProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevEnumDevLayerProps) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkEnumerateDeviceLayerProperties(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkEnumerateDeviceLayerProperties(bad_physical_dev, &count, nullptr),
+ "vkEnumerateDeviceLayerProperties: Invalid physicalDevice "
+ "\\[VUID-vkEnumerateDeviceLayerProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSparseImgFormatProps) {
ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSparseImageFormatProperties(
bad_physical_dev, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TYPE_2D, VK_SAMPLE_COUNT_1_BIT,
VK_IMAGE_USAGE_STORAGE_BIT, VK_IMAGE_TILING_LINEAR, &count, nullptr),
- "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ "vkGetPhysicalDeviceSparseImageFormatProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSparseImageFormatProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevFeature2) {
VkPhysicalDeviceFeatures2 features = {};
features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
features.pNext = nullptr;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceFeatures2(bad_physical_dev, &features), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(
+ env->vulkan_functions.vkGetPhysicalDeviceFeatures2(bad_physical_dev, &features),
+ "vkGetPhysicalDeviceFeatures2: Invalid physicalDevice \\[VUID-vkGetPhysicalDeviceFeatures2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevFormatProps2) {
properties.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
properties.pNext = nullptr;
ASSERT_DEATH(
- env->vulkan_functions.vkGetPhysicalDeviceFormatProperties2(bad_physical_dev, VK_FORMAT_R8G8B8A8_UNORM, &properties), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ env->vulkan_functions.vkGetPhysicalDeviceFormatProperties2(bad_physical_dev, VK_FORMAT_R8G8B8A8_UNORM, &properties),
+ "vkGetPhysicalDeviceFormatProperties2: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceFormatProperties2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevImgFormatProps2) {
VkImageFormatProperties2 properties = {};
properties.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2;
properties.pNext = nullptr;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceImageFormatProperties2(bad_physical_dev, &format_info, &properties), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceImageFormatProperties2(bad_physical_dev, &format_info, &properties),
+ "vkGetPhysicalDeviceImageFormatProperties2: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceImageFormatProperties2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevProps2) {
VkPhysicalDeviceProperties2 properties = {};
properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
properties.pNext = nullptr;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceProperties2(bad_physical_dev, &properties), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceProperties2(bad_physical_dev, &properties),
+ "vkGetPhysicalDeviceProperties2: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceProperties2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevQueueFamProps2) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceQueueFamilyProperties2(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceQueueFamilyProperties2(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceQueueFamilyProperties2: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceQueueFamilyProperties2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevDevMemProps2) {
VkPhysicalDeviceMemoryProperties2 properties = {};
properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2;
properties.pNext = nullptr;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceMemoryProperties2(bad_physical_dev, &properties), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceMemoryProperties2(bad_physical_dev, &properties),
+ "vkGetPhysicalDeviceMemoryProperties2: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceMemoryProperties2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSparseImgFormatProps2) {
info.pNext = nullptr;
uint32_t count = 0;
ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSparseImageFormatProperties2(bad_physical_dev, &info, &count, nullptr),
- "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ "vkGetPhysicalDeviceSparseImageFormatProperties2: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevExternFenceProps) {
info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO;
info.pNext = nullptr;
VkExternalFenceProperties props = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceExternalFenceProperties(bad_physical_dev, &info, &props), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceExternalFenceProperties(bad_physical_dev, &info, &props),
+ "vkGetPhysicalDeviceExternalFenceProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceExternalFenceProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevExternBufferProps) {
info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO;
info.pNext = nullptr;
VkExternalBufferProperties props = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceExternalBufferProperties(bad_physical_dev, &info, &props), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceExternalBufferProperties(bad_physical_dev, &info, &props),
+ "vkGetPhysicalDeviceExternalBufferProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceExternalBufferProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevExternSemaphoreProps) {
info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO;
info.pNext = nullptr;
VkExternalSemaphoreProperties props = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceExternalSemaphoreProperties(bad_physical_dev, &info, &props), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceExternalSemaphoreProperties(bad_physical_dev, &info, &props),
+ "vkGetPhysicalDeviceExternalSemaphoreProperties: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceExternalSemaphoreProperties-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceSupportKHR) {
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VkBool32 supported = VK_FALSE;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceSupportKHR(bad_physical_dev, 0, VK_NULL_HANDLE, &supported), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceSupportKHR(bad_physical_dev, 0, VK_NULL_HANDLE, &supported),
+ "vkGetPhysicalDeviceSurfaceSupportKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceCapsKHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VkSurfaceCapabilitiesKHR caps = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(bad_physical_dev, VK_NULL_HANDLE, &caps), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(bad_physical_dev, VK_NULL_HANDLE, &caps),
+ "vkGetPhysicalDeviceSurfaceCapabilitiesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceFormatsKHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceFormatsKHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceFormatsKHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr),
+ "vkGetPhysicalDeviceSurfaceFormatsKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfacePresentModesKHR) {
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfacePresentModesKHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr),
- "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ "vkGetPhysicalDeviceSurfacePresentModesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter\\]");
}
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
IDirectFB directfb;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDirectFBPresentationSupportEXT(bad_physical_dev, 0, &directfb), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDirectFBPresentationSupportEXT(bad_physical_dev, 0, &directfb),
+ "vkGetPhysicalDeviceDirectFBPresentationSupportEXT: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceDirectFBPresentationSupportEXT-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_DIRECTFB_EXT
uint64_t bad_array[3] = {0x123456789AB, 0x23456789AB1, 0x9876543210AB};
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
- ASSERT_DEATH(env->vulkan_functions.PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX(bad_physical_dev, 0, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX(bad_physical_dev, 0, nullptr),
+ "vkGetPhysicalDeviceScreenPresentationSupportQNX: Invalid instance "
+ "\\[VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-instance-parameter\\]");
}
#endif // VK_USE_PLATFORM_SCREEN_QNX
uint64_t bad_array[3] = {0x123456789AB, 0x23456789AB1, 0x9876543210AB};
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceWaylandPresentationSupportKHR(bad_physical_dev, 0, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceWaylandPresentationSupportKHR(bad_physical_dev, 0, nullptr),
+ "vkGetPhysicalDeviceWaylandPresentationSupportKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_WAYLAND_KHR
uint64_t bad_array[3] = {0x123456789AB, 0x23456789AB1, 0x9876543210AB};
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceWin32PresentationSupportKHR(bad_physical_dev, 0), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceWin32PresentationSupportKHR(bad_physical_dev, 0),
+ "vkGetPhysicalDeviceWin32PresentationSupportKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_WIN32_KHR
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
xcb_visualid_t visual = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceXcbPresentationSupportKHR(bad_physical_dev, 0, nullptr, visual), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceXcbPresentationSupportKHR(bad_physical_dev, 0, nullptr, visual),
+ "vkGetPhysicalDeviceXcbPresentationSupportKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_XCB_KHR
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VisualID visual = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceXlibPresentationSupportKHR(bad_physical_dev, 0, nullptr, visual), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceXlibPresentationSupportKHR(bad_physical_dev, 0, nullptr, visual),
+ "vkGetPhysicalDeviceXlibPresentationSupportKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_XLIB_KHR
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayPropertiesKHR(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayPropertiesKHR(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceDisplayPropertiesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPlanePropsKHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceDisplayPlanePropertiesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetDisplayPlaneSupportedDisplaysKHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetDisplayPlaneSupportedDisplaysKHR(bad_physical_dev, 0, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetDisplayPlaneSupportedDisplaysKHR(bad_physical_dev, 0, &count, nullptr),
+ "vkGetDisplayPlaneSupportedDisplaysKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetDisplayModePropsKHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetDisplayModePropertiesKHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(
+ env->vulkan_functions.vkGetDisplayModePropertiesKHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr),
+ "vkGetDisplayModePropertiesKHR: Invalid physicalDevice \\[VUID-vkGetDisplayModePropertiesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevCreateDisplayModeKHR) {
create_info.pNext = nullptr;
VkDisplayModeKHR display_mode;
ASSERT_DEATH(
- env->vulkan_functions.vkCreateDisplayModeKHR(bad_physical_dev, VK_NULL_HANDLE, &create_info, nullptr, &display_mode), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ env->vulkan_functions.vkCreateDisplayModeKHR(bad_physical_dev, VK_NULL_HANDLE, &create_info, nullptr, &display_mode),
+ "vkCreateDisplayModeKHR: Invalid physicalDevice \\[VUID-vkCreateDisplayModeKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetDisplayPlaneCapsKHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
VkDisplayPlaneCapabilitiesKHR caps = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetDisplayPlaneCapabilitiesKHR(bad_physical_dev, VK_NULL_HANDLE, 0, &caps), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetDisplayPlaneCapabilitiesKHR(bad_physical_dev, VK_NULL_HANDLE, 0, &caps),
+ "vkGetDisplayPlaneCapabilitiesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevPresentRectsKHR) {
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDevicePresentRectanglesKHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr),
- "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ "vkGetPhysicalDevicePresentRectanglesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDevicePresentRectanglesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayProps2KHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayProperties2KHR(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayProperties2KHR(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceDisplayProperties2KHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceDisplayProperties2KHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPlaneProps2KHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayPlaneProperties2KHR(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceDisplayPlaneProperties2KHR(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceDisplayPlaneProperties2KHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceDisplayPlaneProperties2KHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetDisplayModeProps2KHR) {
} my_bad_data;
VkPhysicalDevice bad_physical_dev = (VkPhysicalDevice)(&my_bad_data);
uint32_t count = 0;
- ASSERT_DEATH(env->vulkan_functions.vkGetDisplayModeProperties2KHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetDisplayModeProperties2KHR(bad_physical_dev, VK_NULL_HANDLE, &count, nullptr),
+ "vkGetDisplayModeProperties2KHR: Invalid physicalDevice "
+ "\\[VUID-vkGetDisplayModeProperties2KHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetDisplayPlaneCaps2KHR) {
disp_plane_info.sType = VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR;
disp_plane_info.pNext = nullptr;
VkDisplayPlaneCapabilities2KHR caps = {};
- ASSERT_DEATH(env->vulkan_functions.vkGetDisplayPlaneCapabilities2KHR(bad_physical_dev, &disp_plane_info, &caps), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(env->vulkan_functions.vkGetDisplayPlaneCapabilities2KHR(bad_physical_dev, &disp_plane_info, &caps),
+ "vkGetDisplayPlaneCapabilities2KHR: Invalid physicalDevice "
+ "\\[VUID-vkGetDisplayPlaneCapabilities2KHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceCaps2KHR) {
phys_dev_surf_info.pNext = nullptr;
VkSurfaceCapabilities2KHR caps = {};
ASSERT_DEATH(env->vulkan_functions.vkGetPhysicalDeviceSurfaceCapabilities2KHR(bad_physical_dev, &phys_dev_surf_info, &caps),
- "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ "vkGetPhysicalDeviceSurfaceCapabilities2KHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceFormats2KHR) {
phys_dev_surf_info.pNext = nullptr;
uint32_t count = 0;
ASSERT_DEATH(
- env->vulkan_functions.vkGetPhysicalDeviceSurfaceFormats2KHR(bad_physical_dev, &phys_dev_surf_info, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ env->vulkan_functions.vkGetPhysicalDeviceSurfaceFormats2KHR(bad_physical_dev, &phys_dev_surf_info, &count, nullptr),
+ "vkGetPhysicalDeviceSurfaceFormats2KHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevEnumPhysDevQueueFamilyPerfQueryCountersKHR) {
env->vulkan_functions.vkGetInstanceProcAddr(instance,
"vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, 0, &count, nullptr, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, 0, &count, nullptr, nullptr),
+ "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR: Invalid physicalDevice "
+ "\\[VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevQueueFamilyPerfQueryPassesKHR) {
reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, &create_info, &count), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, &create_info, &count),
+ "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevFragmentShadingRatesKHR) {
PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR pfn = reinterpret_cast<PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceFragmentShadingRatesKHR: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevMSPropsEXT) {
PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT pfn = reinterpret_cast<PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, VK_SAMPLE_COUNT_1_BIT, &props), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, VK_SAMPLE_COUNT_1_BIT, &props),
+ "vkGetPhysicalDeviceMultisamplePropertiesEXT: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevAcquireDrmDisplayEXT) {
PFN_vkAcquireDrmDisplayEXT pfn = reinterpret_cast<PFN_vkAcquireDrmDisplayEXT>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkAcquireDrmDisplayEXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, 0, VK_NULL_HANDLE), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, 0, VK_NULL_HANDLE),
+ "vkAcquireDrmDisplayEXT: Invalid physicalDevice \\[VUID-vkAcquireDrmDisplayEXT-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetDrmDisplayEXT) {
PFN_vkGetDrmDisplayEXT pfn =
reinterpret_cast<PFN_vkGetDrmDisplayEXT>(env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetDrmDisplayEXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, 0, 0, VK_NULL_HANDLE), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, 0, 0, VK_NULL_HANDLE),
+ "vkGetDrmDisplayEXT: Invalid physicalDevice "
+ "\\[VUID-vkGetDrmDisplayEXT-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevReleaseDisplayEXT) {
PFN_vkReleaseDisplayEXT pfn =
reinterpret_cast<PFN_vkReleaseDisplayEXT>(env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkReleaseDisplayEXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, VK_NULL_HANDLE), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, VK_NULL_HANDLE),
+ "vkReleaseDisplayEXT: Invalid physicalDevice \\[VUID-vkReleaseDisplayEXT-physicalDevice-parameter\\]");
}
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
PFN_vkAcquireXlibDisplayEXT pfn = reinterpret_cast<PFN_vkAcquireXlibDisplayEXT>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkAcquireXlibDisplayEXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, nullptr, VK_NULL_HANDLE), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, nullptr, VK_NULL_HANDLE),
+ "vkAcquireXlibDisplayEXT: Invalid physicalDevice \\[VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter\\]");
}
TEST_F(LoaderHandleValidTests, BadPhysDevGetRandROutputDisplayEXT) {
PFN_vkGetRandROutputDisplayEXT pfn = reinterpret_cast<PFN_vkGetRandROutputDisplayEXT>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetRandROutputDisplayEXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, nullptr, rrout, &disp), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(
+ pfn(bad_physical_dev, nullptr, rrout, &disp),
+ "vkGetRandROutputDisplayEXT: Invalid physicalDevice \\[VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT pfn = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT>(
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT"));
ASSERT_NE(pfn, nullptr);
- ASSERT_DEATH(pfn(bad_physical_dev, &phys_dev_surf_info, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, &phys_dev_surf_info, &count, nullptr),
+ "vkGetPhysicalDeviceSurfacePresentModes2EXT: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter\\]");
}
#endif // VK_USE_PLATFORM_WIN32_KHR
env->vulkan_functions.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceToolPropertiesEXT"));
ASSERT_NE(pfn, nullptr);
uint32_t count = 0;
- ASSERT_DEATH(pfn(bad_physical_dev, &count, nullptr), "");
- // TODO: Look for "invalid physicalDevice" in stderr log to make sure correct error is thrown
+ ASSERT_DEATH(pfn(bad_physical_dev, &count, nullptr),
+ "vkGetPhysicalDeviceToolPropertiesEXT: Invalid physicalDevice "
+ "\\[VUID-vkGetPhysicalDeviceToolPropertiesEXT-physicalDevice-parameter\\]");
}
#ifdef VK_USE_PLATFORM_ANDROID_KHR