Function inexor::vulkan_renderer::tools::is_gpu_suitable

Function Documentation

bool inexor::vulkan_renderer::tools::is_gpu_suitable(const DeviceInfo &info, const VkPhysicalDeviceFeatures &required_features, const std::span<const char*> required_extensions, bool print_info = false)

Determine if a physical device is suitable. In order for a physical device to be suitable, it must support all required device features and required extensions.

Parameters:
  • info – The device info data

  • required_features – The required device features the physical device must all support

  • required_extensions – The required device extensions the physical device must all support

  • print_message – If true, an info message will be printed to the console if a device feature or device extension is not supported (true by default)

Returns:

true if the physical device supports all device features and device extensions