diff options
-rwxr-xr-x | README.md | 2 | ||||
-rwxr-xr-x | src/input_common/helpers/joycon_protocol/joycon_types.h | 1 | ||||
-rwxr-xr-x | src/input_common/helpers/joycon_protocol/nfc.cpp | 10 | ||||
-rwxr-xr-x | src/input_common/helpers/joycon_protocol/nfc.h | 5 | ||||
-rwxr-xr-x | src/video_core/vulkan_common/vulkan_device.cpp | 10 | ||||
-rwxr-xr-x | src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 2 |
6 files changed, 24 insertions, 6 deletions
@@ -1,7 +1,7 @@ | |||
1 | yuzu emulator early access | 1 | yuzu emulator early access |
2 | ============= | 2 | ============= |
3 | 3 | ||
4 | This is the source code for early-access 3588. | 4 | This is the source code for early-access 3589. |
5 | 5 | ||
6 | ## Legal Notice | 6 | ## Legal Notice |
7 | 7 | ||
diff --git a/src/input_common/helpers/joycon_protocol/joycon_types.h b/src/input_common/helpers/joycon_protocol/joycon_types.h index b03143e04..1c8d294b0 100755 --- a/src/input_common/helpers/joycon_protocol/joycon_types.h +++ b/src/input_common/helpers/joycon_protocol/joycon_types.h | |||
@@ -394,6 +394,7 @@ enum class DriverResult { | |||
394 | InvalidHandle, | 394 | InvalidHandle, |
395 | NotSupported, | 395 | NotSupported, |
396 | Disabled, | 396 | Disabled, |
397 | Delayed, | ||
397 | Unknown, | 398 | Unknown, |
398 | }; | 399 | }; |
399 | 400 | ||
diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp index 77ea6d5cf..14818ae33 100755 --- a/src/input_common/helpers/joycon_protocol/nfc.cpp +++ b/src/input_common/helpers/joycon_protocol/nfc.cpp | |||
@@ -72,6 +72,11 @@ DriverResult NfcProtocol::StartNFCPollingMode() { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | DriverResult NfcProtocol::ScanAmiibo(std::vector<u8>& data) { | 74 | DriverResult NfcProtocol::ScanAmiibo(std::vector<u8>& data) { |
75 | if (update_counter++ < AMIIBO_UPDATE_DELAY) { | ||
76 | return DriverResult::Delayed; | ||
77 | } | ||
78 | update_counter = 0; | ||
79 | |||
75 | LOG_DEBUG(Input, "Start NFC pooling Mode"); | 80 | LOG_DEBUG(Input, "Start NFC pooling Mode"); |
76 | ScopedSetBlocking sb(this); | 81 | ScopedSetBlocking sb(this); |
77 | DriverResult result{DriverResult::Success}; | 82 | DriverResult result{DriverResult::Success}; |
@@ -87,7 +92,7 @@ DriverResult NfcProtocol::ScanAmiibo(std::vector<u8>& data) { | |||
87 | result = WaitUntilNfcIsReady(); | 92 | result = WaitUntilNfcIsReady(); |
88 | } | 93 | } |
89 | if (result == DriverResult::Success) { | 94 | if (result == DriverResult::Success) { |
90 | result = StartPolling(tag_data); | 95 | result = StartPolling(tag_data, 7); |
91 | } | 96 | } |
92 | if (result == DriverResult::Success) { | 97 | if (result == DriverResult::Success) { |
93 | result = GetAmiiboData(data); | 98 | result = GetAmiiboData(data); |
@@ -129,9 +134,8 @@ DriverResult NfcProtocol::WaitUntilNfcIsReady() { | |||
129 | return DriverResult::Success; | 134 | return DriverResult::Success; |
130 | } | 135 | } |
131 | 136 | ||
132 | DriverResult NfcProtocol::StartPolling(TagFoundData& data) { | 137 | DriverResult NfcProtocol::StartPolling(TagFoundData& data, std::size_t timeout_limit) { |
133 | LOG_DEBUG(Input, "Start Polling for tag"); | 138 | LOG_DEBUG(Input, "Start Polling for tag"); |
134 | constexpr std::size_t timeout_limit = 7; | ||
135 | MCUCommandResponse output{}; | 139 | MCUCommandResponse output{}; |
136 | std::size_t tries = 0; | 140 | std::size_t tries = 0; |
137 | 141 | ||
diff --git a/src/input_common/helpers/joycon_protocol/nfc.h b/src/input_common/helpers/joycon_protocol/nfc.h index 11e263e07..eddf5932e 100755 --- a/src/input_common/helpers/joycon_protocol/nfc.h +++ b/src/input_common/helpers/joycon_protocol/nfc.h | |||
@@ -32,6 +32,8 @@ public: | |||
32 | bool IsEnabled() const; | 32 | bool IsEnabled() const; |
33 | 33 | ||
34 | private: | 34 | private: |
35 | static constexpr std::size_t AMIIBO_UPDATE_DELAY = 15; | ||
36 | |||
35 | struct TagFoundData { | 37 | struct TagFoundData { |
36 | u8 type; | 38 | u8 type; |
37 | std::vector<u8> uuid; | 39 | std::vector<u8> uuid; |
@@ -39,7 +41,7 @@ private: | |||
39 | 41 | ||
40 | DriverResult WaitUntilNfcIsReady(); | 42 | DriverResult WaitUntilNfcIsReady(); |
41 | 43 | ||
42 | DriverResult StartPolling(TagFoundData& data); | 44 | DriverResult StartPolling(TagFoundData& data, std::size_t timeout_limit = 1); |
43 | 45 | ||
44 | DriverResult ReadTag(const TagFoundData& data); | 46 | DriverResult ReadTag(const TagFoundData& data); |
45 | 47 | ||
@@ -56,6 +58,7 @@ private: | |||
56 | NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const; | 58 | NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const; |
57 | 59 | ||
58 | bool is_enabled{}; | 60 | bool is_enabled{}; |
61 | std::size_t update_counter{}; | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | } // namespace InputCommon::Joycon | 64 | } // namespace InputCommon::Joycon |
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 5bc424897..cfaa85836 100755 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
@@ -406,6 +406,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
406 | features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; | 406 | features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; |
407 | features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; | 407 | features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; |
408 | dynamic_state3_blending = false; | 408 | dynamic_state3_blending = false; |
409 | |||
410 | const u32 version = (properties.properties.driverVersion << 3) >> 3; | ||
411 | if (version < VK_MAKE_API_VERSION(0, 23, 1, 0)) { | ||
412 | LOG_WARNING(Render_Vulkan, | ||
413 | "RADV versions older than 23.1.0 have broken depth clamp dynamic state"); | ||
414 | features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = false; | ||
415 | dynamic_state3_enables = false; | ||
416 | } | ||
409 | } | 417 | } |
410 | if (extensions.vertex_input_dynamic_state && is_radv) { | 418 | if (extensions.vertex_input_dynamic_state && is_radv) { |
411 | // TODO(ameerj): Blacklist only offending driver versions | 419 | // TODO(ameerj): Blacklist only offending driver versions |
@@ -1009,6 +1017,8 @@ void Device::CollectPhysicalMemoryInfo() { | |||
1009 | device_access_memory += mem_properties.memoryHeaps[element].size; | 1017 | device_access_memory += mem_properties.memoryHeaps[element].size; |
1010 | } | 1018 | } |
1011 | if (!is_integrated) { | 1019 | if (!is_integrated) { |
1020 | const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 2_GiB); | ||
1021 | device_access_memory -= reserve_memory; | ||
1012 | return; | 1022 | return; |
1013 | } | 1023 | } |
1014 | const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); | 1024 | const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); |
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 28307f3fa..fc94c578b 100755 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp | |||
@@ -147,7 +147,7 @@ public: | |||
147 | 147 | ||
148 | /// Returns whether this allocation is compatible with the arguments. | 148 | /// Returns whether this allocation is compatible with the arguments. |
149 | [[nodiscard]] bool IsCompatible(VkMemoryPropertyFlags flags, u32 type_mask) const { | 149 | [[nodiscard]] bool IsCompatible(VkMemoryPropertyFlags flags, u32 type_mask) const { |
150 | return (flags & property_flags) == property_flags && (type_mask & shifted_memory_type) != 0; | 150 | return (flags & property_flags) == flags && (type_mask & shifted_memory_type) != 0; |
151 | } | 151 | } |
152 | 152 | ||
153 | private: | 153 | private: |