8#include <unordered_set>
10#include "flutter/fml/build_config.h"
30 bool enable_validation_layers) {
31 if (!enable_validation_layers) {
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"};
64 std::vector<VkLayerProperties> properties;
65 properties.resize(
count);
79 std::unordered_set<std::string> available_extensions;
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;
98 bool enable_validation_layers) {
100 enable_validation_layers);
106 bool enable_validation_layers) {
112 enable_validation_layers);
VkPhysicalDevice physical_device
bool ValidationErrorsFatal()
std::vector< std::string > DeviceLayersToEnable(const VulkanProcTable &vk, const VulkanHandle< VkPhysicalDevice > &physical_device, bool enable_validation_layers)
static std::vector< std::string > InstanceOrDeviceLayersToEnable(const VulkanProcTable &vk, VkPhysicalDevice physical_device, bool enable_validation_layers)
std::vector< std::string > InstanceLayersToEnable(const VulkanProcTable &vk, bool enable_validation_layers)
bool ValidationLayerInfoMessagesEnabled()
#define VK_CALL_LOG_ERROR(expression)