|
|
|
@ -53,8 +53,8 @@ TEST_F(LoaderHandleValidTests, BadInstEnumPhysDevices) {
|
|
|
|
|
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) {
|
|
|
|
@ -69,8 +69,8 @@ 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) {
|
|
|
|
@ -85,8 +85,8 @@ 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) {
|
|
|
|
@ -105,8 +105,8 @@ 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) {
|
|
|
|
@ -130,8 +130,8 @@ 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) {
|
|
|
|
@ -156,8 +156,7 @@ 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
|
|
|
|
@ -182,8 +181,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateAndroidSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -209,8 +208,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateDirectFBSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -237,8 +236,7 @@ TEST_F(LoaderHandleValidTests, BadInstCreateFuchsiaSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -265,8 +263,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateGGPSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -292,8 +290,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateIOSSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -319,8 +317,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateMacOSSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -346,8 +344,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateMetalSurf) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -373,7 +371,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateQNXSurf) {
|
|
|
|
|
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
|
|
|
|
@ -400,7 +399,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateViNNSurf) {
|
|
|
|
|
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
|
|
|
|
@ -427,7 +427,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateWaylandSurf) {
|
|
|
|
|
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
|
|
|
|
@ -454,7 +455,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateWin32Surf) {
|
|
|
|
|
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
|
|
|
|
@ -481,7 +483,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateXCBSurf) {
|
|
|
|
|
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
|
|
|
|
@ -508,7 +511,8 @@ TEST_F(LoaderHandleValidTests, BadInstCreateXlibSurf) {
|
|
|
|
|
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
|
|
|
|
@ -529,8 +533,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevFeature) {
|
|
|
|
|
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) {
|
|
|
|
@ -548,8 +553,9 @@ 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) {
|
|
|
|
@ -569,8 +575,8 @@ 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) {
|
|
|
|
@ -587,8 +593,9 @@ 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) {
|
|
|
|
@ -604,8 +611,9 @@ 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) {
|
|
|
|
@ -622,8 +630,9 @@ 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) {
|
|
|
|
@ -659,8 +668,8 @@ 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) {
|
|
|
|
@ -676,8 +685,9 @@ 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) {
|
|
|
|
@ -693,8 +703,9 @@ 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) {
|
|
|
|
@ -714,8 +725,8 @@ 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) {
|
|
|
|
@ -734,8 +745,9 @@ 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) {
|
|
|
|
@ -755,8 +767,9 @@ 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) {
|
|
|
|
@ -778,8 +791,9 @@ 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) {
|
|
|
|
@ -798,8 +812,9 @@ 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) {
|
|
|
|
@ -815,8 +830,9 @@ 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) {
|
|
|
|
@ -835,8 +851,9 @@ 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) {
|
|
|
|
@ -857,8 +874,8 @@ 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) {
|
|
|
|
@ -878,8 +895,9 @@ 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) {
|
|
|
|
@ -899,8 +917,9 @@ 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) {
|
|
|
|
@ -920,8 +939,9 @@ 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) {
|
|
|
|
@ -941,8 +961,9 @@ 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) {
|
|
|
|
@ -961,8 +982,9 @@ 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) {
|
|
|
|
@ -981,8 +1003,9 @@ 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) {
|
|
|
|
@ -1002,8 +1025,8 @@ 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
|
|
|
|
@ -1024,8 +1047,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetDirectFBPresentSupportKHR) {
|
|
|
|
|
} 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
|
|
|
|
|
|
|
|
|
@ -1046,8 +1070,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetQNXPresentSupportKHR) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -1068,8 +1093,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevWaylandPresentSupportKHR) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -1090,8 +1116,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevWin32PresentSupportKHR) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -1114,8 +1141,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetXCBPresentSupportKHR) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -1138,8 +1166,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetXlibPresentSupportKHR) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -1160,8 +1189,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPropsKHR) {
|
|
|
|
|
} 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) {
|
|
|
|
@ -1181,8 +1211,9 @@ 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) {
|
|
|
|
@ -1202,8 +1233,9 @@ 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) {
|
|
|
|
@ -1223,8 +1255,9 @@ 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) {
|
|
|
|
@ -1248,8 +1281,8 @@ 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) {
|
|
|
|
@ -1269,8 +1302,9 @@ 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) {
|
|
|
|
@ -1291,8 +1325,8 @@ 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) {
|
|
|
|
@ -1312,8 +1346,9 @@ 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) {
|
|
|
|
@ -1333,8 +1368,9 @@ 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) {
|
|
|
|
@ -1354,8 +1390,9 @@ 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) {
|
|
|
|
@ -1378,8 +1415,9 @@ 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) {
|
|
|
|
@ -1403,8 +1441,8 @@ 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) {
|
|
|
|
@ -1427,8 +1465,9 @@ 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) {
|
|
|
|
@ -1448,8 +1487,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevEnumPhysDevQueueFamilyPerfQueryCounters
|
|
|
|
|
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) {
|
|
|
|
@ -1471,8 +1511,9 @@ 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) {
|
|
|
|
@ -1490,8 +1531,9 @@ 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) {
|
|
|
|
@ -1509,8 +1551,9 @@ 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) {
|
|
|
|
@ -1531,8 +1574,8 @@ 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) {
|
|
|
|
@ -1553,8 +1596,9 @@ 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) {
|
|
|
|
@ -1575,8 +1619,8 @@ 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
|
|
|
|
@ -1598,8 +1642,8 @@ TEST_F(LoaderHandleValidTests, BadPhysDevAcquireXlibDisplayEXT) {
|
|
|
|
|
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) {
|
|
|
|
@ -1622,8 +1666,9 @@ 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
|
|
|
|
|
|
|
|
|
@ -1646,8 +1691,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfacePresentModes2EXT) {
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -1666,8 +1712,9 @@ TEST_F(LoaderHandleValidTests, BadPhysDevGetPhysDevToolPropertiesEXT) {
|
|
|
|
|
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
|
|
|
|
|