From 80b010b1e1b08c1f092fb2bfa337faadf8ea1ba3 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Mon, 22 May 2023 16:02:39 +0200 Subject: vulkaninfo: Reduce NVIDIA quaternary version field to 6 bits The tertiary version field is shifted 6 bits to the right, meaning there are only 6 bits left to for the quaternary version field, not 10. See also: https://github.com/SaschaWillems/vulkan.gpuinfo.org/blob/1e6ca6e3c0763daabd6a101b860ab4354a07f5d3/functions.php#L305 --- vulkaninfo/vulkaninfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vulkaninfo/vulkaninfo.h b/vulkaninfo/vulkaninfo.h index 8f3ea926..81ad3e9e 100644 --- a/vulkaninfo/vulkaninfo.h +++ b/vulkaninfo/vulkaninfo.h @@ -1796,13 +1796,13 @@ struct AppGpu { if ((found_driver_props && driver_props.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY) || (!found_driver_props && props.deviceID == 4318)) { return std::to_string((v >> 22) & 0x3ff) + "." + std::to_string((v >> 14) & 0x0ff) + "." + - std::to_string((v >> 6) & 0x0ff) + "." + std::to_string((v)&0x003ff); + std::to_string((v >> 6) & 0x0ff) + "." + std::to_string(v & 0x003f); } else if ((found_driver_props && driver_props.driverID == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) #if defined(WIN32) || (!found_driver_props && props.deviceID == 0x8086) // only do the fallback check if running in windows #endif ) { - return std::to_string((v >> 14)) + "." + std::to_string((v)&0x3fff); + return std::to_string(v >> 14) + "." + std::to_string(v & 0x3fff); } else { // AMD uses the standard vulkan scheme return VulkanVersion(v).str(); -- cgit v1.2.3