From cc9eed1bd259ddfe52d574c07e9a081e4901cc30 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 10 Feb 2024 20:39:06 +0100 Subject: [PATCH] early-access version 4129 --- README.md | 2 +- .../hle/service/am/library_applet_creator.cpp | 8 +++++--- src/video_core/host_shaders/vulkan_present.vert | 10 ++++------ src/video_core/texture_cache/image_info.cpp | 1 + src/video_core/texture_cache/image_info.h | 1 + src/video_core/texture_cache/texture_cache.h | 15 ++++++++------- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e15dd4722..b647f6931 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 4128. +This is the source code for early-access 4129. ## Legal Notice diff --git a/src/core/hle/service/am/library_applet_creator.cpp b/src/core/hle/service/am/library_applet_creator.cpp index 3e2a1d9c1..00d5a0705 100755 --- a/src/core/hle/service/am/library_applet_creator.cpp +++ b/src/core/hle/service/am/library_applet_creator.cpp @@ -104,12 +104,14 @@ std::shared_ptr CreateGuestApplet(Core::System& system, // TODO: enable other versions of applets enum : u8 { - Firmware1600 = 15, - Firmware1700 = 16, + Firmware1400 = 14, + Firmware1500 = 15, + Firmware1600 = 16, + Firmware1700 = 17, }; auto process = std::make_unique(system); - if (!process->Initialize(program_id, Firmware1600, Firmware1700)) { + if (!process->Initialize(program_id, Firmware1400, Firmware1700)) { // Couldn't initialize the guest process return {}; } diff --git a/src/video_core/host_shaders/vulkan_present.vert b/src/video_core/host_shaders/vulkan_present.vert index 034e5f475..91c4dfbe4 100755 --- a/src/video_core/host_shaders/vulkan_present.vert +++ b/src/video_core/host_shaders/vulkan_present.vert @@ -19,15 +19,13 @@ layout (push_constant) uniform PushConstants { // Any member of a push constant block that is declared as an // array must only be accessed with dynamically uniform indices. ScreenRectVertex GetVertex(int index) { - switch (index) { - case 0: - default: + if (index < 1) { return vertices[0]; - case 1: + } else if (index < 2) { return vertices[1]; - case 2: + } else if (index < 3) { return vertices[2]; - case 3: + } else { return vertices[3]; } } diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp index 22eb7bd00..4cfaf7ce6 100755 --- a/src/video_core/texture_cache/image_info.cpp +++ b/src/video_core/texture_cache/image_info.cpp @@ -42,6 +42,7 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept { }; } rescaleable = false; + is_sparse = config.is_sparse != 0; tile_width_spacing = config.tile_width_spacing; if (config.texture_type != TextureType::Texture2D && config.texture_type != TextureType::Texture2DNoMipmap) { diff --git a/src/video_core/texture_cache/image_info.h b/src/video_core/texture_cache/image_info.h index 0a50795b3..286457acc 100755 --- a/src/video_core/texture_cache/image_info.h +++ b/src/video_core/texture_cache/image_info.h @@ -41,6 +41,7 @@ struct ImageInfo { bool downscaleable = false; bool forced_flushed = false; bool dma_downloaded = false; + bool is_sparse = false; }; } // namespace VideoCommon diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 85046e708..47ea0bd96 100755 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -600,17 +600,17 @@ void TextureCache

::UnmapGPUMemory(size_t as_id, GPUVAddr gpu_addr, size_t siz [&](ImageId id, Image&) { deleted_images.push_back(id); }); for (const ImageId id : deleted_images) { Image& image = slot_images[id]; - if (True(image.flags & ImageFlagBits::CpuModified)) { - continue; + if (False(image.flags & ImageFlagBits::CpuModified)) { + image.flags |= ImageFlagBits::CpuModified; + if (True(image.flags & ImageFlagBits::Tracked)) { + UntrackImage(image, id); + } } - image.flags |= ImageFlagBits::CpuModified; + if (True(image.flags & ImageFlagBits::Remapped)) { continue; } image.flags |= ImageFlagBits::Remapped; - if (True(image.flags & ImageFlagBits::Tracked)) { - UntrackImage(image, id); - } } } @@ -1469,7 +1469,8 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, DA const ImageId new_image_id = slot_images.insert(runtime, new_info, gpu_addr, cpu_addr); Image& new_image = slot_images[new_image_id]; - if (!gpu_memory->IsContinuousRange(new_image.gpu_addr, new_image.guest_size_bytes)) { + if (!gpu_memory->IsContinuousRange(new_image.gpu_addr, new_image.guest_size_bytes) && + new_info.is_sparse) { new_image.flags |= ImageFlagBits::Sparse; }