diff options
| author | 2021-06-28 14:51:49 -0400 | |
|---|---|---|
| committer | 2021-06-28 14:51:49 -0400 | |
| commit | ec68cba44032c4ea1ef3d1de4aecaefc693f4a12 (patch) | |
| tree | 48fcef18920efbfedd88fe7d79cd7bbbbcce56d8 /src/video_core/vulkan_common | |
| parent | Merge pull request #6535 from ameerj/insert-fancy-name (diff) | |
| parent | gl_device: Expand on Mesa driver names (diff) | |
| download | yuzu-ec68cba44032c4ea1ef3d1de4aecaefc693f4a12.tar.gz yuzu-ec68cba44032c4ea1ef3d1de4aecaefc693f4a12.tar.xz yuzu-ec68cba44032c4ea1ef3d1de4aecaefc693f4a12.zip | |
Merge pull request #6502 from ameerj/vendor-title
main: Add GPU Vendor name to running title bar
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 21 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 23814afd2..f214510da 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -532,6 +532,27 @@ bool Device::IsFormatSupported(VkFormat wanted_format, VkFormatFeatureFlags want | |||
| 532 | return (supported_usage & wanted_usage) == wanted_usage; | 532 | return (supported_usage & wanted_usage) == wanted_usage; |
| 533 | } | 533 | } |
| 534 | 534 | ||
| 535 | std::string Device::GetDriverName() const { | ||
| 536 | switch (driver_id) { | ||
| 537 | case VK_DRIVER_ID_AMD_PROPRIETARY: | ||
| 538 | return "AMD"; | ||
| 539 | case VK_DRIVER_ID_AMD_OPEN_SOURCE: | ||
| 540 | return "AMDVLK"; | ||
| 541 | case VK_DRIVER_ID_MESA_RADV: | ||
| 542 | return "RADV"; | ||
| 543 | case VK_DRIVER_ID_NVIDIA_PROPRIETARY: | ||
| 544 | return "NVIDIA"; | ||
| 545 | case VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS: | ||
| 546 | return "INTEL"; | ||
| 547 | case VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA: | ||
| 548 | return "ANV"; | ||
| 549 | case VK_DRIVER_ID_MESA_LLVMPIPE: | ||
| 550 | return "LAVAPIPE"; | ||
| 551 | default: | ||
| 552 | return vendor_name; | ||
| 553 | } | ||
| 554 | } | ||
| 555 | |||
| 535 | void Device::CheckSuitability(bool requires_swapchain) const { | 556 | void Device::CheckSuitability(bool requires_swapchain) const { |
| 536 | std::bitset<REQUIRED_EXTENSIONS.size()> available_extensions; | 557 | std::bitset<REQUIRED_EXTENSIONS.size()> available_extensions; |
| 537 | bool has_swapchain = false; | 558 | bool has_swapchain = false; |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 88b298196..96c0f8c60 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -45,6 +45,9 @@ public: | |||
| 45 | /// Reports a shader to Nsight Aftermath. | 45 | /// Reports a shader to Nsight Aftermath. |
| 46 | void SaveShader(const std::vector<u32>& spirv) const; | 46 | void SaveShader(const std::vector<u32>& spirv) const; |
| 47 | 47 | ||
| 48 | /// Returns the name of the VkDriverId reported from Vulkan. | ||
| 49 | std::string GetDriverName() const; | ||
| 50 | |||
| 48 | /// Returns the dispatch loader with direct function pointers of the device. | 51 | /// Returns the dispatch loader with direct function pointers of the device. |
| 49 | const vk::DeviceDispatch& GetDispatchLoader() const { | 52 | const vk::DeviceDispatch& GetDispatchLoader() const { |
| 50 | return dld; | 53 | return dld; |