From a8f426f152fea983bdcef335ca7b442e72fa62d9 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sun, 10 Sep 2023 04:07:21 +0200 Subject: [PATCH] early-access version 3861 --- README.md | 2 +- src/audio_core/renderer/command/data_source/adpcm.cpp | 2 +- .../renderer/command/data_source/pcm_float.cpp | 2 +- .../renderer/command/data_source/pcm_int16.cpp | 2 +- src/core/internal_network/network.cpp | 5 ++++- src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 11 +++++++---- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0757dd337..3ffe963b9 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3860. +This is the source code for early-access 3861. ## Legal Notice diff --git a/src/audio_core/renderer/command/data_source/adpcm.cpp b/src/audio_core/renderer/command/data_source/adpcm.cpp index ebf4b9307..48528072e 100755 --- a/src/audio_core/renderer/command/data_source/adpcm.cpp +++ b/src/audio_core/renderer/command/data_source/adpcm.cpp @@ -23,7 +23,7 @@ void AdpcmDataSourceVersion1Command::Process(const AudioRenderer::CommandListPro for (auto& wave_buffer : wave_buffers) { wave_buffer.loop_start_offset = wave_buffer.start_offset; wave_buffer.loop_end_offset = wave_buffer.end_offset; - wave_buffer.loop_count = -(wave_buffer.loop & 1); + wave_buffer.loop_count = wave_buffer.loop ? -1 : 0; } DecodeFromWaveBuffersArgs args{ diff --git a/src/audio_core/renderer/command/data_source/pcm_float.cpp b/src/audio_core/renderer/command/data_source/pcm_float.cpp index bf4e5bdea..2e2228310 100755 --- a/src/audio_core/renderer/command/data_source/pcm_float.cpp +++ b/src/audio_core/renderer/command/data_source/pcm_float.cpp @@ -24,7 +24,7 @@ void PcmFloatDataSourceVersion1Command::Process( for (auto& wave_buffer : wave_buffers) { wave_buffer.loop_start_offset = wave_buffer.start_offset; wave_buffer.loop_end_offset = wave_buffer.end_offset; - wave_buffer.loop_count = -(wave_buffer.loop & 1); + wave_buffer.loop_count = wave_buffer.loop ? -1 : 0; } DecodeFromWaveBuffersArgs args{ diff --git a/src/audio_core/renderer/command/data_source/pcm_int16.cpp b/src/audio_core/renderer/command/data_source/pcm_int16.cpp index 35265229a..bdf748628 100755 --- a/src/audio_core/renderer/command/data_source/pcm_int16.cpp +++ b/src/audio_core/renderer/command/data_source/pcm_int16.cpp @@ -26,7 +26,7 @@ void PcmInt16DataSourceVersion1Command::Process( for (auto& wave_buffer : wave_buffers) { wave_buffer.loop_start_offset = wave_buffer.start_offset; wave_buffer.loop_end_offset = wave_buffer.end_offset; - wave_buffer.loop_count = -(wave_buffer.loop & 1); + wave_buffer.loop_count = wave_buffer.loop ? -1 : 0; } DecodeFromWaveBuffersArgs args{ diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 8d4c88798..e67031281 100755 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp @@ -201,7 +201,10 @@ void InterruptSocketOperations() { void AcknowledgeInterrupt() { u8 value = 0; - read(interrupt_pipe_fd[0], &value, sizeof(value)); + ssize_t ret = read(interrupt_pipe_fd[0], &value, sizeof(value)); + if (ret != 1 && errno != EAGAIN && errno != EWOULDBLOCK) { + LOG_ERROR(Network, "Failed to acknowledge interrupt on shutdown"); + } } SOCKET GetInterruptSocket() { diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index a65a3ee72..65d130d3b 100755 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -532,17 +532,20 @@ void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings& bi buffer_handles.push_back(handle); } if (device.IsExtExtendedDynamicStateSupported()) { - scheduler.Record([bindings_ = std::move(bindings), + scheduler.Record([this, bindings_ = std::move(bindings), buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) { cmdbuf.BindVertexBuffers2EXT(bindings_.min_index, - bindings_.max_index - bindings_.min_index, + std::min(bindings_.max_index - bindings_.min_index, + device.GetMaxVertexInputBindings()), buffer_handles_.data(), bindings_.offsets.data(), bindings_.sizes.data(), bindings_.strides.data()); }); } else { - scheduler.Record([bindings_ = std::move(bindings), + scheduler.Record([this, bindings_ = std::move(bindings), buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) { - cmdbuf.BindVertexBuffers(bindings_.min_index, bindings_.max_index - bindings_.min_index, + cmdbuf.BindVertexBuffers(bindings_.min_index, + std::min(bindings_.max_index - bindings_.min_index, + device.GetMaxVertexInputBindings()), buffer_handles_.data(), bindings_.offsets.data()); }); }