| 719 | } |
| 720 | |
| 721 | std::string parse_driver_sersion(const vk::PhysicalDeviceProperties & p) |
| 722 | { |
| 723 | // See https://github.com/SaschaWillems/vulkan.gpuinfo.org/blob/1e6ca6e3c0763daabd6a101b860ab4354a07f5d3/functions.php#L294 |
| 724 | switch (p.vendorID) |
| 725 | { |
| 726 | case 0x10de: // nvidia |
| 727 | return fmt::format( |
| 728 | "{}.{}.{}.{}", |
| 729 | (p.driverVersion >> 22) & 0x3ff, |
| 730 | (p.driverVersion >> 14) & 0xff, |
| 731 | (p.driverVersion >> 6) & 0xff, |
| 732 | p.driverVersion & 0x3f); |
| 733 | |
| 734 | default: |
| 735 | return fmt::format( |
| 736 | "{}.{}.{}", |
| 737 | VK_VERSION_MAJOR(p.driverVersion), |
| 738 | VK_VERSION_MINOR(p.driverVersion), |
| 739 | VK_VERSION_PATCH(p.driverVersion)); |
| 740 | } |
| 741 | } |
| 742 | |
| 743 | void application::initialize_vulkan() |
| 744 | { |