diff --git a/README.md b/README.md index 808a5ac59..689223e0c 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3914. +This is the source code for early-access 3915. ## Legal Notice diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 98741fddb..d8895a9b5 100755 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -546,11 +546,13 @@ void IGeneralService::IsAnyInternetRequestAccepted(HLERequestContext& ctx) { } void IGeneralService::IsAnyForegroundRequestAccepted(HLERequestContext& ctx) { - LOG_ERROR(Service_NIFM, "(STUBBED) called"); + const bool is_accepted{}; + + LOG_WARNING(Service_NIFM, "(STUBBED) called, is_accepted={}", is_accepted); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - rb.Push(0); + rb.Push(is_accepted); } IGeneralService::IGeneralService(Core::System& system_) diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index 7bbec848c..e2b84bbce 100755 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp @@ -138,6 +138,8 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red, return PixelFormat::E5B9G9R9_FLOAT; case Hash(TextureFormat::Z32, FLOAT): return PixelFormat::D32_FLOAT; + case Hash(TextureFormat::Z32, FLOAT, UINT, UINT, UINT, LINEAR): + return PixelFormat::D32_FLOAT; case Hash(TextureFormat::Z16, UNORM): return PixelFormat::D16_UNORM; case Hash(TextureFormat::Z16, UNORM, UINT, UINT, UINT, LINEAR): diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index a31558b9e..7249f0d44 100755 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1357,8 +1357,6 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA join_bad_overlap_ids.clear(); join_copies_to_do.clear(); join_alias_indices.clear(); - boost::container::small_vector merge_mips; - ImageId merge_with_existing_id{}; const bool this_is_linear = info.type == ImageType::Linear; const auto region_check = [&](ImageId overlap_id, ImageBase& overlap) { if (True(overlap.flags & ImageFlagBits::Remapped)) { @@ -1399,12 +1397,6 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA join_right_aliased_ids.push_back(overlap_id); overlap.flags |= ImageFlagBits::Alias; join_copies_to_do.emplace_back(JoinCopy{true, overlap_id}); - } else if (IsSubLevel(new_image_base, overlap)) { - if (new_image_base.info.resources.levels > overlap.info.resources.levels) { - merge_mips.push_back(overlap_id); - } else { - merge_with_existing_id = overlap_id; - } } else { join_bad_overlap_ids.push_back(overlap_id); } @@ -1447,10 +1439,6 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA } } - if (merge_with_existing_id) { - return merge_with_existing_id; - } - const ImageId new_image_id = slot_images.insert(runtime, new_info, gpu_addr, cpu_addr); Image& new_image = slot_images[new_image_id]; @@ -1479,32 +1467,6 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA ScaleDown(new_image); } - const auto& resolution = Settings::values.resolution_info; - const u32 up_scale = can_rescale ? resolution.up_scale : 1; - const u32 down_shift = can_rescale ? resolution.down_shift : 0; - - for (auto overlap_id : merge_mips) { - auto& overlap = slot_images[overlap_id]; - if (True(overlap.flags & ImageFlagBits::GpuModified)) { - new_image.flags |= ImageFlagBits::GpuModified; - new_image.modification_tick = overlap.modification_tick; - - const SubresourceBase base = new_image.TryFindBase(overlap.gpu_addr).value(); - auto copies = - MakeShrinkImageCopies(new_image.info, overlap.info, base, up_scale, down_shift); - if (new_image.info.num_samples != overlap.info.num_samples) { - runtime.CopyImageMSAA(new_image, overlap, std::move(copies)); - } else { - runtime.CopyImage(new_image, overlap, std::move(copies)); - } - } - if (True(overlap.flags & ImageFlagBits::Tracked)) { - UntrackImage(overlap, overlap_id); - } - UnregisterImage(overlap_id); - DeleteImage(overlap_id); - } - std::ranges::sort(join_copies_to_do, [this](const JoinCopy& lhs, const JoinCopy& rhs) { const ImageBase& lhs_image = slot_images[lhs.id]; const ImageBase& rhs_image = slot_images[rhs.id]; @@ -1561,7 +1523,10 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA } if (True(overlap.flags & ImageFlagBits::GpuModified)) { new_image.flags |= ImageFlagBits::GpuModified; + const auto& resolution = Settings::values.resolution_info; const SubresourceBase base = new_image.TryFindBase(overlap.gpu_addr).value(); + const u32 up_scale = can_rescale ? resolution.up_scale : 1; + const u32 down_shift = can_rescale ? resolution.down_shift : 0; auto copies = MakeShrinkImageCopies(new_info, overlap.info, base, up_scale, down_shift); if (overlap.info.num_samples != new_image.info.num_samples) { runtime.CopyImageMSAA(new_image, overlap, std::move(copies)); diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index adb76c4ed..b06df673c 100755 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -1233,33 +1233,6 @@ bool IsSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr .has_value(); } -bool IsSubLevel(const ImageBase& image, const ImageBase& overlap) { - const std::optional base = image.TryFindBase(overlap.gpu_addr); - if (!base) { - return false; - } - if (!IsViewCompatible(image.info.format, overlap.info.format, false, true)) { - return false; - } - if (AdjustMipSize(image.info.size, base->level) != overlap.info.size) { - return false; - } - - const auto level_info = MakeLevelInfo(image.info); - auto level_sizes = CalculateLevelSizes(level_info, image.info.resources.levels); - auto total_size{0}; - auto level = base->level; - while (level) { - total_size += level_sizes[level - 1]; - level--; - } - - if (overlap.gpu_addr - total_size != image.gpu_addr) { - return false; - } - return true; -} - bool IsSubCopy(const ImageInfo& candidate, const ImageBase& image, GPUVAddr candidate_addr) { const std::optional base = image.TryFindBase(candidate_addr); if (!base) { diff --git a/src/video_core/texture_cache/util.h b/src/video_core/texture_cache/util.h index 0afb8422a..a0332387f 100755 --- a/src/video_core/texture_cache/util.h +++ b/src/video_core/texture_cache/util.h @@ -111,8 +111,6 @@ void SwizzleImage(Tegra::MemoryManager& gpu_memory, GPUVAddr gpu_addr, const Ima GPUVAddr candidate_addr, RelaxedOptions options, bool broken_views, bool native_bgr); -[[nodiscard]] bool IsSubLevel(const ImageBase& image, const ImageBase& overlap); - [[nodiscard]] bool IsSubCopy(const ImageInfo& candidate, const ImageBase& image, GPUVAddr candidate_addr);