tests: layer init moved to instance create - drop from device
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 8d62a93..f58d5e1 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -66,12 +66,12 @@
ErrorMonitor *m_errorMonitor;
virtual void SetUp() {
- const char *layer_names[] = {"MemTracker", "ObjectTracker"};
- const std::vector<const char *> layers(layer_names, layer_names + 2);
+ const char *extension_names[] = {"MemTracker", "ObjectTracker"};
+ const std::vector<const char *> extensions(extension_names, extension_names + 2);
size_t extSize = sizeof(uint32_t);
uint32_t extCount = 0;
- VkResult err;
+ VkResult U_ASSERT_ONLY err;
err = vkGetGlobalExtensionInfo(VK_EXTENSION_INFO_TYPE_COUNT, 0, &extSize, &extCount);
assert(!err);
@@ -79,16 +79,17 @@
extSize = sizeof(VkExtensionProperties);
bool32_t extFound;
- for (uint32_t i = 0; i < layers.size(); i++) {
+ for (uint32_t i = 0; i < extensions.size(); i++) {
extFound = 0;
for (uint32_t j = 0; j < extCount; j++) {
err = vkGetGlobalExtensionInfo(VK_EXTENSION_INFO_TYPE_PROPERTIES, j, &extSize, &extProp);
- if (!strcmp(layers[i], extProp.extName)) {
+ assert(!err);
+ if (!strcmp(extensions[i], extProp.extName)) {
extFound = 1;
break;
}
}
- ASSERT_EQ(extFound, 1) << "ERROR: Cannot find extension named " << layers[i] << " which is necessary to pass this test";
+ ASSERT_EQ(extFound, 1) << "ERROR: Cannot find extension named " << extensions[i] << " which is necessary to pass this test";
}
this->app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
@@ -99,7 +100,7 @@
this->app_info.engineVersion = 1;
this->app_info.apiVersion = VK_API_VERSION;
- InitFramework(layers);
+ InitFramework(extensions);
m_errorMonitor = new ErrorMonitor(inst);
}