7 #define LUG_DEFINE_DEFINITION_VULKAN_FUNCTIONS(name) PFN_##name name = nullptr; 12 #undef LUG_DEFINE_DEFINITION_VULKAN_FUNCTIONS 20 bool InstanceInfo::containsExtension(
const char* extensionName)
const {
21 auto compareExtensions = [&extensionName](
const VkExtensionProperties& extension) {
22 return std::strcmp(extension.extensionName, extensionName) == 0;
25 return std::find_if(extensions.cbegin(), extensions.cend(), compareExtensions) != extensions.cend();
28 bool InstanceInfo::containsLayer(
const char* layerName)
const {
29 auto compareLayers = [&layerName](
const VkLayerProperties& layer) {
30 return std::strcmp(layer.layerName, layerName) == 0;
33 return std::find_if(layers.cbegin(), layers.cend(), compareLayers) != layers.cend();
36 bool PhysicalDeviceInfo::containsExtension(
const char* extensionName)
const {
37 auto compareExtensions = [&extensionName](
const VkExtensionProperties& extension) {
38 return std::strcmp(extension.extensionName, extensionName) == 0;
41 return std::find_if(extensions.cbegin(), extensions.cend(), compareExtensions) != extensions.cend();
44 bool PhysicalDeviceInfo::containsQueueFlags(VkQueueFlags queueFlags, int8_t& idx)
const {
47 for (uint8_t i = 0; i < queueFamilies.size(); ++i) {
48 if (queueFamilies[i].queueCount && (queueFamilies[i].queueFlags & queueFlags) == queueFlags) {
49 if (idx == -1 || queueFamilies[i].queueFlags == queueFlags) {
#define LUG_DEFINE_DEFINITION_VULKAN_FUNCTIONS(name)
LUG_DEVICE_VULKAN_FUNCTIONS(LUG_DEFINE_DECLARATION_VULKAN_FUNCTIONS)
LUG_CORE_VULKAN_FUNCTIONS(LUG_DEFINE_DECLARATION_VULKAN_FUNCTIONS)
LUG_INSTANCE_VULKAN_FUNCTIONS(LUG_DEFINE_DECLARATION_VULKAN_FUNCTIONS)
LUG_EXPORTED_VULKAN_FUNCTIONS(LUG_DEFINE_DECLARATION_VULKAN_FUNCTIONS)