early-access version 3589

This commit is contained in:
pineappleEA 2023-05-14 12:14:58 +02:00
parent 20c9a554e5
commit 6d16ab8a99
6 changed files with 24 additions and 6 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3588. This is the source code for early-access 3589.
## Legal Notice ## Legal Notice

View file

@ -394,6 +394,7 @@ enum class DriverResult {
InvalidHandle, InvalidHandle,
NotSupported, NotSupported,
Disabled, Disabled,
Delayed,
Unknown, Unknown,
}; };

View file

@ -72,6 +72,11 @@ DriverResult NfcProtocol::StartNFCPollingMode() {
} }
DriverResult NfcProtocol::ScanAmiibo(std::vector<u8>& data) { DriverResult NfcProtocol::ScanAmiibo(std::vector<u8>& data) {
if (update_counter++ < AMIIBO_UPDATE_DELAY) {
return DriverResult::Delayed;
}
update_counter = 0;
LOG_DEBUG(Input, "Start NFC pooling Mode"); LOG_DEBUG(Input, "Start NFC pooling Mode");
ScopedSetBlocking sb(this); ScopedSetBlocking sb(this);
DriverResult result{DriverResult::Success}; DriverResult result{DriverResult::Success};
@ -87,7 +92,7 @@ DriverResult NfcProtocol::ScanAmiibo(std::vector<u8>& data) {
result = WaitUntilNfcIsReady(); result = WaitUntilNfcIsReady();
} }
if (result == DriverResult::Success) { if (result == DriverResult::Success) {
result = StartPolling(tag_data); result = StartPolling(tag_data, 7);
} }
if (result == DriverResult::Success) { if (result == DriverResult::Success) {
result = GetAmiiboData(data); result = GetAmiiboData(data);
@ -129,9 +134,8 @@ DriverResult NfcProtocol::WaitUntilNfcIsReady() {
return DriverResult::Success; return DriverResult::Success;
} }
DriverResult NfcProtocol::StartPolling(TagFoundData& data) { DriverResult NfcProtocol::StartPolling(TagFoundData& data, std::size_t timeout_limit) {
LOG_DEBUG(Input, "Start Polling for tag"); LOG_DEBUG(Input, "Start Polling for tag");
constexpr std::size_t timeout_limit = 7;
MCUCommandResponse output{}; MCUCommandResponse output{};
std::size_t tries = 0; std::size_t tries = 0;

View file

@ -32,6 +32,8 @@ public:
bool IsEnabled() const; bool IsEnabled() const;
private: private:
static constexpr std::size_t AMIIBO_UPDATE_DELAY = 15;
struct TagFoundData { struct TagFoundData {
u8 type; u8 type;
std::vector<u8> uuid; std::vector<u8> uuid;
@ -39,7 +41,7 @@ private:
DriverResult WaitUntilNfcIsReady(); DriverResult WaitUntilNfcIsReady();
DriverResult StartPolling(TagFoundData& data); DriverResult StartPolling(TagFoundData& data, std::size_t timeout_limit = 1);
DriverResult ReadTag(const TagFoundData& data); DriverResult ReadTag(const TagFoundData& data);
@ -56,6 +58,7 @@ private:
NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const; NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const;
bool is_enabled{}; bool is_enabled{};
std::size_t update_counter{};
}; };
} // namespace InputCommon::Joycon } // namespace InputCommon::Joycon

View file

@ -406,6 +406,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false;
features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false;
dynamic_state3_blending = false; dynamic_state3_blending = false;
const u32 version = (properties.properties.driverVersion << 3) >> 3;
if (version < VK_MAKE_API_VERSION(0, 23, 1, 0)) {
LOG_WARNING(Render_Vulkan,
"RADV versions older than 23.1.0 have broken depth clamp dynamic state");
features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = false;
dynamic_state3_enables = false;
}
} }
if (extensions.vertex_input_dynamic_state && is_radv) { if (extensions.vertex_input_dynamic_state && is_radv) {
// TODO(ameerj): Blacklist only offending driver versions // TODO(ameerj): Blacklist only offending driver versions
@ -1009,6 +1017,8 @@ void Device::CollectPhysicalMemoryInfo() {
device_access_memory += mem_properties.memoryHeaps[element].size; device_access_memory += mem_properties.memoryHeaps[element].size;
} }
if (!is_integrated) { if (!is_integrated) {
const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 2_GiB);
device_access_memory -= reserve_memory;
return; return;
} }
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);

View file

@ -147,7 +147,7 @@ public:
/// Returns whether this allocation is compatible with the arguments. /// Returns whether this allocation is compatible with the arguments.
[[nodiscard]] bool IsCompatible(VkMemoryPropertyFlags flags, u32 type_mask) const { [[nodiscard]] bool IsCompatible(VkMemoryPropertyFlags flags, u32 type_mask) const {
return (flags & property_flags) == property_flags && (type_mask & shifted_memory_type) != 0; return (flags & property_flags) == flags && (type_mask & shifted_memory_type) != 0;
} }
private: private: