src/PepperGrains/Video.cpp
// True if this device can be used at all
True if this device can be used at all
True if this device can be used at all
bool isVulkanPhysicalDeviceSuitable(const std::vector<const char*>& mRequiredPhysDeviceExts) {
            if(Video::Vulkan::getGraphicsQueueFamilyIndex() == -1 || 
                Video::Vulkan::getDisplayQueueFamilyIndex() == -1) return false;
            for(const char* reqExt : mRequiredPhysDeviceExts) {
                bool found = false;
                for(VkExtensionProperties ext : Video::Vulkan::getAvailablePhysicalDeviceExtensions()) {
                    if(strcmp(ext.extensionName, reqExt) == 0) {
                        found = true;
                        break;
                    }
                }
                if(!found) return false;
            }
            if(Video::Vulkan::getAvailablePresentModes().empty() || 
                Video::Vulkan::getAvailableSurfaceFormats().empty()) return false;
            return true;
        }
bool isVulkanPhysicalDeviceSuitable ( const std :: vector < const char * > & mRequiredPhysDeviceExts ) { if ( Video :: Vulkan :: getGraphicsQueueFamilyIndex ( ) == -1 || Video :: Vulkan :: getDisplayQueueFamilyIndex ( ) == -1 ) return false ; for ( const char * reqExt : mRequiredPhysDeviceExts ) { bool found = false ; for ( VkExtensionProperties ext : Video :: Vulkan :: getAvailablePhysicalDeviceExtensions ( ) ) { if ( strcmp ( ext . extensionName , reqExt ) == 0 ) { found = true ; break ; } } if ( ! found ) return false ; } if ( Video :: Vulkan :: getAvailablePresentModes ( ) . empty ( ) || Video :: Vulkan :: getAvailableSurfaceFormats ( ) . empty ( ) ) return false ; return true ; }
True if this device can be used at all
True if this device can be used at all
// Note: Check after extensions // Nothing contradicted the assumption that it is suitable