41 const std::vector<std::string> candidates = {
"VK_LAYER_KHRONOS_validation"};
43 const std::vector<std::string> candidates = {
44 "VK_LAYER_GOOGLE_threading",
"VK_LAYER_LUNARG_parameter_validation",
45 "VK_LAYER_LUNARG_object_tracker",
"VK_LAYER_LUNARG_core_validation",
46 "VK_LAYER_LUNARG_device_limits",
"VK_LAYER_LUNARG_image",
47 "VK_LAYER_LUNARG_swapchain",
"VK_LAYER_GOOGLE_unique_objects"};
54 &count,
nullptr)) != VK_SUCCESS) {
64 std::vector<VkLayerProperties> properties;
65 properties.resize(count);
69 &count, properties.data())) != VK_SUCCESS) {
79 std::unordered_set<std::string> available_extensions;
81 for (
size_t i = 0;
i < count;
i++) {
82 available_extensions.emplace(properties[
i].layerName);
85 std::vector<std::string> available_candidates;
87 for (
const auto& candidate : candidates) {
88 auto found = available_extensions.find(candidate);
89 if (found != available_extensions.end()) {
90 available_candidates.emplace_back(candidate);
94 return available_candidates;
VkPhysicalDevice physical_device
bool enable_validation_layers