diff options
| author | 2023-06-15 16:17:19 -0400 | |
|---|---|---|
| committer | 2023-06-18 16:15:51 -0400 | |
| commit | b9a86b040b7e310ad3b39540ce7b6249cb965536 (patch) | |
| tree | 3be5cfc06e7bd571bd75ae4791e9ba3e488bdc67 /src | |
| parent | video_core: Formalize HasBrokenCompute (diff) | |
| download | yuzu-b9a86b040b7e310ad3b39540ce7b6249cb965536.tar.gz yuzu-b9a86b040b7e310ad3b39540ce7b6249cb965536.tar.xz yuzu-b9a86b040b7e310ad3b39540ce7b6249cb965536.zip | |
vk_device_info: Check only affected Intel drivers
Renames is_intel_proprietary to has_broken_compute for accuracy.
vk_device_info: Use vulkan::device to check compute
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/vk_device_info.cpp | 13 | ||||
| -rw-r--r-- | src/yuzu/vk_device_info.h | 4 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 78b487494..a4965524a 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp | |||
| @@ -508,7 +508,7 @@ void ConfigureGraphics::RetrieveVulkanDevices() { | |||
| 508 | vulkan_devices.push_back(QString::fromStdString(record.name)); | 508 | vulkan_devices.push_back(QString::fromStdString(record.name)); |
| 509 | device_present_modes.push_back(record.vsync_support); | 509 | device_present_modes.push_back(record.vsync_support); |
| 510 | 510 | ||
| 511 | if (record.is_intel_proprietary) { | 511 | if (record.has_broken_compute) { |
| 512 | expose_compute_option(); | 512 | expose_compute_option(); |
| 513 | } | 513 | } |
| 514 | } | 514 | } |
diff --git a/src/yuzu/vk_device_info.cpp b/src/yuzu/vk_device_info.cpp index 9bd1ec686..7c26a3dc7 100644 --- a/src/yuzu/vk_device_info.cpp +++ b/src/yuzu/vk_device_info.cpp | |||
| @@ -5,10 +5,12 @@ | |||
| 5 | #include <vector> | 5 | #include <vector> |
| 6 | #include "common/dynamic_library.h" | 6 | #include "common/dynamic_library.h" |
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "video_core/vulkan_common/vulkan_device.h" | ||
| 8 | #include "video_core/vulkan_common/vulkan_instance.h" | 9 | #include "video_core/vulkan_common/vulkan_instance.h" |
| 9 | #include "video_core/vulkan_common/vulkan_library.h" | 10 | #include "video_core/vulkan_common/vulkan_library.h" |
| 10 | #include "video_core/vulkan_common/vulkan_surface.h" | 11 | #include "video_core/vulkan_common/vulkan_surface.h" |
| 11 | #include "video_core/vulkan_common/vulkan_wrapper.h" | 12 | #include "video_core/vulkan_common/vulkan_wrapper.h" |
| 13 | #include "vulkan/vulkan_core.h" | ||
| 12 | #include "yuzu/qt_common.h" | 14 | #include "yuzu/qt_common.h" |
| 13 | #include "yuzu/vk_device_info.h" | 15 | #include "yuzu/vk_device_info.h" |
| 14 | 16 | ||
| @@ -16,8 +18,8 @@ class QWindow; | |||
| 16 | 18 | ||
| 17 | namespace VkDeviceInfo { | 19 | namespace VkDeviceInfo { |
| 18 | Record::Record(std::string_view name_, const std::vector<VkPresentModeKHR>& vsync_modes_, | 20 | Record::Record(std::string_view name_, const std::vector<VkPresentModeKHR>& vsync_modes_, |
| 19 | bool is_intel_proprietary_) | 21 | bool has_broken_compute_) |
| 20 | : name{name_}, vsync_support{vsync_modes_}, is_intel_proprietary{is_intel_proprietary_} {} | 22 | : name{name_}, vsync_support{vsync_modes_}, has_broken_compute{has_broken_compute_} {} |
| 21 | 23 | ||
| 22 | Record::~Record() = default; | 24 | Record::~Record() = default; |
| 23 | 25 | ||
| @@ -48,9 +50,10 @@ void PopulateRecords(std::vector<Record>& records, QWindow* window) try { | |||
| 48 | properties.pNext = &driver_properties; | 50 | properties.pNext = &driver_properties; |
| 49 | dld.vkGetPhysicalDeviceProperties2(physical_device, &properties); | 51 | dld.vkGetPhysicalDeviceProperties2(physical_device, &properties); |
| 50 | 52 | ||
| 51 | records.push_back(VkDeviceInfo::Record(name, present_modes, | 53 | bool has_broken_compute{Vulkan::Device::CheckBrokenCompute( |
| 52 | driver_properties.driverID == | 54 | driver_properties.driverID, properties.properties.driverVersion)}; |
| 53 | VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS)); | 55 | |
| 56 | records.push_back(VkDeviceInfo::Record(name, present_modes, has_broken_compute)); | ||
| 54 | } | 57 | } |
| 55 | } catch (const Vulkan::vk::Exception& exception) { | 58 | } catch (const Vulkan::vk::Exception& exception) { |
| 56 | LOG_ERROR(Frontend, "Failed to enumerate devices with error: {}", exception.what()); | 59 | LOG_ERROR(Frontend, "Failed to enumerate devices with error: {}", exception.what()); |
diff --git a/src/yuzu/vk_device_info.h b/src/yuzu/vk_device_info.h index 5a6c64416..bda8262f4 100644 --- a/src/yuzu/vk_device_info.h +++ b/src/yuzu/vk_device_info.h | |||
| @@ -24,12 +24,12 @@ namespace VkDeviceInfo { | |||
| 24 | class Record { | 24 | class Record { |
| 25 | public: | 25 | public: |
| 26 | explicit Record(std::string_view name, const std::vector<VkPresentModeKHR>& vsync_modes, | 26 | explicit Record(std::string_view name, const std::vector<VkPresentModeKHR>& vsync_modes, |
| 27 | bool is_intel_proprietary); | 27 | bool has_broken_compute); |
| 28 | ~Record(); | 28 | ~Record(); |
| 29 | 29 | ||
| 30 | const std::string name; | 30 | const std::string name; |
| 31 | const std::vector<VkPresentModeKHR> vsync_support; | 31 | const std::vector<VkPresentModeKHR> vsync_support; |
| 32 | const bool is_intel_proprietary; | 32 | const bool has_broken_compute; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | void PopulateRecords(std::vector<Record>& records, QWindow* window); | 35 | void PopulateRecords(std::vector<Record>& records, QWindow* window); |