ASSERT_TRUE(log.find("has unknown icd manifest file version 3.2.1. May cause errors."));
}
+TEST(DriverManifest, LargeUnknownManifestVersion) {
+ FrameworkEnvironment env{};
+ env.add_icd(TestICDDetails(
+ ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_file_format_version({100, 222, 111})));
+ env.get_test_icd().physical_devices.push_back({});
+
+ DebugUtilsLogger log;
+ InstWrapper inst{env.vulkan_functions};
+ inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+ FillDebugUtilsCreateDetails(inst.create_info, log);
+ inst.CheckCreate();
+ ASSERT_TRUE(log.find("loader_parse_icd_manifest: "));
+ // log prints the path to the file, don't look for it since it is hard to determine inside the test what the path should be.
+ ASSERT_TRUE(log.find("has unknown icd manifest file version 100.222.111. May cause errors."));
+}
+
TEST(LayerManifest, UnknownManifestVersion) {
FrameworkEnvironment env{};
env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
env.add_implicit_layer(ManifestLayer{}
.add_layer(ManifestLayer::LayerDescription{}
.set_name(implicit_layer_name)
- .set_api_version(VK_MAKE_API_VERSION(1, 1, 0, 0))
+ .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))
.set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
.set_disable_environment("DISABLE_ME"))
.set_file_format_version({3, 2, 1}),
ASSERT_TRUE(log.find("has unknown layer manifest file version 3.2.1. May cause errors."));
}
+TEST(LayerManifest, LargeUnknownManifestVersion) {
+ FrameworkEnvironment env{};
+ env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+ env.get_test_icd().physical_devices.push_back({});
+
+ const char* implicit_layer_name = "ImplicitTestLayer";
+ env.add_implicit_layer(ManifestLayer{}
+ .add_layer(ManifestLayer::LayerDescription{}
+ .set_name(implicit_layer_name)
+ .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))
+ .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+ .set_disable_environment("DISABLE_ME"))
+ .set_file_format_version({100, 222, 111}),
+ "implicit_test_layer.json");
+
+ DebugUtilsLogger log;
+ InstWrapper inst{env.vulkan_functions};
+ inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+ FillDebugUtilsCreateDetails(inst.create_info, log);
+ inst.CheckCreate();
+ ASSERT_TRUE(log.find("loader_add_layer_properties: "));
+ // log prints the path to the file, don't look for it since it is hard to determine inside the test what the path should be.
+ ASSERT_TRUE(log.find("has unknown layer manifest file version 100.222.111. May cause errors."));
+}
+
struct DriverInfo {
DriverInfo(TestICDDetails icd_details, uint32_t driver_version, bool expect_to_find) noexcept
: icd_details(icd_details), driver_version(driver_version), expect_to_find(expect_to_find) {}