Use driver name instead of vendor name in the status bar for Vulkan. (#6146)
* Replace vendor id lookup with driver name * Create separate field for driver name, handle OpenGL * Document changes in VulkanPhysicalDevice.cs * Always display driver over vendor * Replace Vulkan 1.2 requirement with VK_KHR_driver_properties * Remove empty line * Remove redundant unsafe block * Apply suggestions from code review --------- Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
parent
fbdd390f90
commit
d7ec4308b4
7 changed files with 47 additions and 14 deletions
|
@ -84,6 +84,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
internal bool IsTBDR { get; private set; }
|
||||
internal bool IsSharedMemory { get; private set; }
|
||||
public string GpuVendor { get; private set; }
|
||||
public string GpuDriver { get; private set; }
|
||||
public string GpuRenderer { get; private set; }
|
||||
public string GpuVersion { get; private set; }
|
||||
|
||||
|
@ -636,7 +637,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public HardwareInfo GetHardwareInfo()
|
||||
{
|
||||
return new HardwareInfo(GpuVendor, GpuRenderer);
|
||||
return new HardwareInfo(GpuVendor, GpuRenderer, GpuDriver);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -693,6 +694,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
var properties = _physicalDevice.PhysicalDeviceProperties;
|
||||
|
||||
var hasDriverProperties = _physicalDevice.TryGetPhysicalDeviceDriverPropertiesKHR(Api, out var driverProperties);
|
||||
|
||||
string vendorName = VendorUtils.GetNameFromId(properties.VendorID);
|
||||
|
||||
Vendor = VendorUtils.FromId(properties.VendorID);
|
||||
|
@ -707,6 +710,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
Vendor == Vendor.ImgTec;
|
||||
|
||||
GpuVendor = vendorName;
|
||||
GpuDriver = hasDriverProperties ? Marshal.PtrToStringAnsi((IntPtr)driverProperties.DriverName) : vendorName; // Fall back to vendor name if driver name isn't available.
|
||||
GpuRenderer = Marshal.PtrToStringAnsi((IntPtr)properties.DeviceName);
|
||||
GpuVersion = $"Vulkan v{ParseStandardVulkanVersion(properties.ApiVersion)}, Driver v{ParseDriverVersion(ref properties)}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue