MCPcopy Create free account
hub / github.com/WiVRn/WiVRn / parse_driver_sersion

Function parse_driver_sersion

client/application.cpp:721–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719}
720
721std::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
743void application::initialize_vulkan()
744{

Callers 1

initialize_vulkanMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected