Reputation: 171
Hello, I'm beginning with vulkan API, I'm trying to show Validation layers. But the problem is I only have access to one device validation layer : "VK_LAYER_NV_optimus"
{//Enumerating Device Verification Layers
uint32_t layer_count = 0;
vkEnumerateDeviceLayerProperties(_gpu, &layer_count, nullptr);
std::vector<VkLayerProperties> layer_property_list(layer_count);
vkEnumerateDeviceLayerProperties(_gpu, &layer_count, layer_property_list.data());
std::cout << "Device Layers : \n";
for (auto &i : layer_property_list) {
std::cout << " " << i.layerName << "\t\t | " << i.description << std::endl;
}
std::cout << std::endl;
}
In the tutorial i'm following the guys have way more layers whose "VK_LAYER_LUNARG_standard_validation" he is using.
here you can see what the guy got.
I though maybe the tutorial isn't up to date but i can't find anything related to this topic.
thanks for helping :)
Upvotes: 1
Views: 1783
Reputation: 1556
Consider using vkEnumerateInstanceLayerProperties
.
Device layers were deprecated in Vulkan some time ago, essentially making all layers instance layers. In this case, the Optimus layer is probably being registered as both an instance and a device layer, which is allowed and is why it shows up when you list the device layers.
If that does not help, you may have an installation problem that is preventing you from seeing the layers. Consider running vulkaninfo
or via
to help troubleshoot the problem.
Finally, not all layers are validation layers. When you enumerate the layers, you'll find layers that perform other functions, as seen in the screenshot you provided.
Upvotes: 5