MCPcopy Create free account
hub / github.com/SaschaWillems/VulkanCapsViewer / getDriverVersion

Method getDriverVersion

vulkanDeviceInfo.cpp:188–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188std::string VulkanDeviceInfo::getDriverVersion()
189{
190 // NVIDIA
191 if (props.vendorID == 4318)
192 {
193 // 10 bits = major version (up to r1023)
194 // 8 bits = minor version (up to 255)
195 // 8 bits = secondary branch version/build version (up to 255)
196 // 6 bits = tertiary branch/build version (up to 63)
197
198 uint32_t major = (props.driverVersion >> 22) & 0x3ff;
199 uint32_t minor = (props.driverVersion >> 14) & 0x0ff;
200 uint32_t secondaryBranch = (props.driverVersion >> 6) & 0x0ff;
201 uint32_t tertiaryBranch = (props.driverVersion) & 0x003f;
202
203 return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(secondaryBranch) + "." + std::to_string(tertiaryBranch);
204 }
205 else
206 {
207 return vulkanResources::versionToString(props.driverVersion);
208 }
209}
210
211QJsonArray UUIDToJson(uint8_t* UUID)
212{

Callers 1

getReportIdMethod · 0.80

Calls 2

to_stringFunction · 0.85
versionToStringFunction · 0.85

Tested by

no test coverage detected