aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
diff options
context:
space:
mode:
authorMutantAura <44103205+MutantAura@users.noreply.github.com>2024-03-27 17:55:34 +0000
committerGitHub <noreply@github.com>2024-03-27 14:55:34 -0300
commit7124d679fd4345f2ed517e77ab40d90e6bef9650 (patch)
tree9c7a60b2384c64937eae18fa0bf2d681219a8c7b /src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
parentb323a017385ac6e08db4025fe4ef1bfbb41607ab (diff)
UI: Friendly driver name reporting. (#6530)
* Implement friendly VkDriverID names for UI. * Capitalise NVIDIA * Prefer vendor name on macOS * Typo fix Co-authored-by: gdkchan <gab.dark.100@gmail.com> --------- Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
index ede54a6f..d1afeaea 100644
--- a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
+++ b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
@@ -313,8 +313,6 @@ namespace Ryujinx.Graphics.Vulkan
var hasDriverProperties = _physicalDevice.TryGetPhysicalDeviceDriverPropertiesKHR(Api, out var driverProperties);
- string vendorName = VendorUtils.GetNameFromId(properties.VendorID);
-
Vendor = VendorUtils.FromId(properties.VendorID);
IsAmdWindows = Vendor == Vendor.Amd && OperatingSystem.IsWindows();
@@ -326,8 +324,9 @@ namespace Ryujinx.Graphics.Vulkan
Vendor == Vendor.Broadcom ||
Vendor == Vendor.ImgTec;
- GpuVendor = vendorName;
- GpuDriver = hasDriverProperties ? Marshal.PtrToStringAnsi((IntPtr)driverProperties.DriverName) : vendorName; // Fall back to vendor name if driver name isn't available.
+ GpuVendor = VendorUtils.GetNameFromId(properties.VendorID);
+ GpuDriver = hasDriverProperties && !OperatingSystem.IsMacOS() ?
+ VendorUtils.GetFriendlyDriverName(driverProperties.DriverID) : GpuVendor; // Fallback to vendor name if driver is unavailable or on MacOS where vendor is preferred.
fixed (byte* deviceName = properties.DeviceName)
{