Reputation: 9540
I am manually checking for the underlying layers wrapped by VK_LAYER_LUNARG_standard_validation
The wrapper is found, however some of the validation layers it should wrap according to the documentation are not.
I am querying the layers like this:
const std::vector<const char*> validationLayers =
{
"VK_LAYER_GOOGLE_threading",
"VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_device_limits",
"VK_LAYER_LUNARG_object_tracker",
"VK_LAYER_LUNARG_image",
"VK_LAYER_LUNARG_core_validation",
"VK_LAYER_LUNARG_swapchain",
"VK_LAYER_GOOGLE_unique_objects",
};
void PrintLayerStatus(VkLayerProperties layer_info, string layer_name, bool layer_found)
{
string major = to_string(VK_VERSION_MAJOR(layer_info.specVersion));
string minor = to_string(VK_VERSION_MINOR(layer_info.specVersion));
string patch = to_string(VK_VERSION_PATCH(layer_info.specVersion));
string version = major + "." + minor + "." + patch;
string mark = (layer_found) ? string(CHECK) : string(CROSS);
RecordLog("\n" + string(layer_name) + ", "
"Vulkan version " + version + ", "
+ "layer version " + to_string(layer_info.implementationVersion),
"[" + mark + "]", 77, '.');
if(layer_found) RecordLog("\tDescription:", string(layer_info.description), 20);
}
// Find available validation layers
bool CheckValidationLayerSupport()
{
// Query validation layers currently isntalled
uint32_t layerCount;
vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
std::vector<VkLayerProperties> availableLayers(layerCount);
vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data());
RecordLogHeader("Requesting Vulkan validation layers\t ["
+ to_string(layerCount) + "]");
RecordLog("Layer", "Found Status", 80-12);
RecordLog(SEPARATOR_BAR);
// Check needed validation layers against found layers`
for (const char* layerName : validationLayers)
{
bool layerFound = false;
VkLayerProperties layer_info;
for (const auto& layerProperties : availableLayers)
{
if (strcmp(layerName, layerProperties.layerName) == 0)
{
layerFound = true;
layer_info = layerProperties;
break;
}
}
PrintLayerStatus(layer_info, layerName, layerFound);
}
return true;
}
Which produces the output:
================================================================================
Requesting Vulkan validation layers [16]
================================================================================
Layer Found Status
--------------------------------------------------------------------------------
VK_LAYER_GOOGLE_threading, Vulkan version 1.1.92, layer version 1............[✓]
Description: Google Validation Layer
VK_LAYER_LUNARG_parameter_validation, Vulkan version 1.1.92, layer version 1.[✓]
Description: LunarG Validation Layer
VK_LAYER_LUNARG_device_limits, Vulkan version 1.1.92, layer version 1........[✗]
VK_LAYER_LUNARG_object_tracker, Vulkan version 1.1.92, layer version 1.......[✓]
Description: LunarG Validation Layer
VK_LAYER_LUNARG_image, Vulkan version 1.1.92, layer version 1................[✗]
VK_LAYER_LUNARG_core_validation, Vulkan version 1.1.92, layer version 1......[✓]
Description: LunarG Validation Layer
VK_LAYER_LUNARG_swapchain, Vulkan version 1.1.92, layer version 1............[✗]
VK_LAYER_GOOGLE_unique_objects, Vulkan version 1.1.92, layer version 1.......[✓]
Description: Google Validation Layer
I also ran vulkaninfo with grep to see if I could find those layers for example
vulkaninfo | grep VK_LAYER_LUNARG_image
All of them return empty, so it seems I did not properly install the SDK or I did something wrong.
My installation was simply downloading the sdk and linking against the include directory plus running the setup-env.sh script (I do this each time prior to compilation). I am not sure If I have accidentally skipped a step, like running a script.
Upvotes: 2
Views: 2465
Reputation: 13246
You are using old documentation. At the time of writing latest SDK version is 1.1.101.
Per the doc VK_LAYER_LUNARG_standard_validation
consists of:
VK_LAYER_GOOGLE_threading
VK_LAYER_LUNARG_parameter_validation
VK_LAYER_LUNARG_object_tracker
VK_LAYER_LUNARG_core_validation
VK_LAYER_GOOGLE_unique_objects
These seem to check out per your output.
Of course this may (and did) change over time:
VK_LAYER_LUNARG_device_limits
was merged with VK_LAYER_LUNARG_core_validation
and VK_LAYER_LUNARG_parameter_validation
in SDK 1.0.21.
VK_LAYER_LUNARG_image
was merged with VK_LAYER_LUNARG_core_validation
in SDK 1.0.42.
VK_LAYER_LUNARG_swapchain
was merged with VK_LAYER_LUNARG_core_validation
in SDK 1.0.51.
Update: in 1.1.106 VK_LAYER_KHRONOS_validation
is indroduced, and all of the above gets deprecated.
Upvotes: 7