Update yuzu-mainline.git to mainline-0-1105

This commit is contained in:
liushuyu 2022-07-22 20:10:36 -06:00
parent 92d6574837
commit c37703b058
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
4 changed files with 5 additions and 145 deletions

View File

@ -1,93 +0,0 @@
From 25350884f9ea1e3847f74617b0f5a419f21399bb Mon Sep 17 00:00:00 2001
From: Kelebek1 <eeeedddccc@hotmail.co.uk>
Date: Wed, 20 Jul 2022 14:42:26 +0100
Subject: [PATCH] Fix decode span out of bounds
---
.../renderer/command/data_source/decode.cpp | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/audio_core/renderer/command/data_source/decode.cpp b/src/audio_core/renderer/command/data_source/decode.cpp
index 0759a67ef3d..ed20ea5714f 100644
--- a/src/audio_core/renderer/command/data_source/decode.cpp
+++ b/src/audio_core/renderer/command/data_source/decode.cpp
@@ -105,12 +105,10 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
constexpr u32 NibblesPerFrame{16};
if (req.buffer == 0 || req.buffer_size == 0) {
- LOG_ERROR(Service_Audio, "Buffer is 0!");
return 0;
}
if (req.start_offset >= req.end_offset) {
- LOG_ERROR(Service_Audio, "Start offset greater than end offset!");
return 0;
}
@@ -122,8 +120,7 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
end += 1;
}
- if (end / 2 > req.buffer_size) {
- LOG_ERROR(Service_Audio, "End greater than buffer size!");
+ if (req.buffer_size < end / 2) {
return 0;
}
@@ -141,7 +138,7 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
}
const auto size{std::max((samples_to_process / 8U) * SamplesPerFrame, 8U)};
- std::vector<u8> wavebuffer(size, 0);
+ std::vector<u8> wavebuffer(size);
memory.ReadBlockUnsafe(req.buffer + position_in_frame / 2, wavebuffer.data(),
wavebuffer.size());
@@ -239,7 +236,7 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf
args.pitch};
const auto size_required{fraction + remaining_sample_count * sample_rate_ratio};
- if (size_required.to_int_floor() < 0) {
+ if (size_required < 0) {
return;
}
@@ -325,19 +322,22 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf
switch (args.sample_format) {
case SampleFormat::PcmInt16:
samples_decoded = DecodePcm<s16>(
- memory, {&temp_buffer[temp_buffer_pos], args.sample_count}, decode_arg);
+ memory, {&temp_buffer[temp_buffer_pos], temp_buffer_pos - TempBufferSize},
+ decode_arg);
break;
case SampleFormat::PcmFloat:
samples_decoded = DecodePcm<f32>(
- memory, {&temp_buffer[temp_buffer_pos], args.sample_count}, decode_arg);
+ memory, {&temp_buffer[temp_buffer_pos], temp_buffer_pos - TempBufferSize},
+ decode_arg);
break;
case SampleFormat::Adpcm: {
decode_arg.adpcm_context = &voice_state.adpcm_context;
memory.ReadBlockUnsafe(args.data_address, &decode_arg.coefficients, args.data_size);
samples_decoded = DecodeAdpcm(
- memory, {&temp_buffer[temp_buffer_pos], args.sample_count}, decode_arg);
+ memory, {&temp_buffer[temp_buffer_pos], temp_buffer_pos - TempBufferSize},
+ decode_arg);
} break;
default:
diff --git a/src/audio_core/renderer/command/data_source/decode.cpp b/src/audio_core/renderer/command/data_source/decode.cpp
index ed20ea5714f..6d2fe4248f2 100644
--- a/src/audio_core/renderer/command/data_source/decode.cpp
+++ b/src/audio_core/renderer/command/data_source/decode.cpp
@@ -108,7 +108,7 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
return 0;
}
- if (req.start_offset >= req.end_offset) {
+ if (req.end_offset < req.start_offset) {
return 0;
}

View File

@ -1,40 +0,0 @@
From 382b41b18f304fcd7aca76b004f7e19f52706d27 Mon Sep 17 00:00:00 2001
From: Liam <byteslice@airmail.cc>
Date: Tue, 19 Jul 2022 17:46:26 -0400
Subject: [PATCH] video_core: use correct byte size for framebuffer
---
src/video_core/renderer_vulkan/vk_blit_screen.cpp | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp
index 1ec8392e142f..4a1d96322239 100644
--- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp
+++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp
@@ -87,8 +87,12 @@ u32 GetBytesPerPixel(const Tegra::FramebufferConfig& framebuffer) {
}
std::size_t GetSizeInBytes(const Tegra::FramebufferConfig& framebuffer) {
- return static_cast<std::size_t>(framebuffer.stride) *
- static_cast<std::size_t>(framebuffer.height) * GetBytesPerPixel(framebuffer);
+ // TODO(Rodrigo): Read this from HLE
+ constexpr u32 block_height_log2 = 4;
+ const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer);
+ const u64 size_bytes{Tegra::Texture::CalculateSize(
+ true, bytes_per_pixel, framebuffer.stride, framebuffer.height, 1, block_height_log2, 0)};
+ return size_bytes;
}
VkFormat GetFormat(const Tegra::FramebufferConfig& framebuffer) {
@@ -169,9 +173,8 @@ VkSemaphore BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer,
// TODO(Rodrigo): Read this from HLE
constexpr u32 block_height_log2 = 4;
const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer);
- const u64 size_bytes{Tegra::Texture::CalculateSize(true, bytes_per_pixel,
- framebuffer.stride, framebuffer.height,
- 1, block_height_log2, 0)};
+ const u64 size_bytes{GetSizeInBytes(framebuffer)};
+
Tegra::Texture::UnswizzleTexture(
mapped_span.subspan(image_offset, size_bytes), std::span(host_ptr, size_bytes),
bytes_per_pixel, framebuffer.width, framebuffer.height, 1, block_height_log2, 0);

View File

@ -217,8 +217,8 @@
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON",
"-DYUZU_USE_QT_WEB_ENGINE=ON",
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
"-DDISPLAY_VERSION=1100",
"-DBUILD_TAG=mainline-1100",
"-DDISPLAY_VERSION=1105",
"-DBUILD_TAG=mainline-1105",
"-DBUILD_REPOSITORY=yuzu-emu/yuzu-mainline"
],
"build-options": {
@ -242,8 +242,8 @@
{
"type": "git",
"url": "https://github.com/yuzu-emu/yuzu-mainline.git",
"tag": "mainline-0-1100",
"commit": "e567e755db8cda3f9a45fe618bd14aaee006fe23",
"tag": "mainline-0-1105",
"commit": "eb14b2edf4c95b8deb5022cc5fe61382eed105dd",
"disable-shallow-clone": true,
"x-checker-data": {
"type": "git",
@ -265,14 +265,6 @@
{
"type": "file",
"path": "compatibility_list.json"
},
{
"type": "patch",
"path": "382b41b18f304fcd7aca76b004f7e19f52706d27.patch"
},
{
"type": "patch",
"path": "25350884f9ea1e3847f74617b0f5a419f21399bb.patch"
}
]
}

View File

@ -47,6 +47,7 @@
<screenshot>https://raw.githubusercontent.com/yuzu-emu/yuzu-emu.github.io/master/images/screenshots/039-Pok%C3%A9mon%20Mystery%20Dungeon%20Rescue%20Team%20DX.png.png.png</screenshot>
</screenshots>
<releases>
<release version="mainline-0-1105" date="2022-07-23"/>
<release version="mainline-0-1100" date="2022-07-20"/>
<release version="mainline-0-1099" date="2022-07-20"/>
<release version="mainline-0-1098" date="2022-07-20"/>