VERY experimental Nintendo Switch 2 emulator
C++
[texture_cache, nifm] fix crashes for linear image type and set nifm logs to debug (#2549)
Maufeat48f7387e3afe
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cppindex 7d43677c6f..b486e56d68 100644--- a/src/core/hle/service/nifm/nifm.cpp+++ b/src/core/hle/service/nifm/nifm.cpp@@ -381,7 +381,7 @@ public:private:void Submit(HLERequestContext& ctx) {- LOG_WARNING(Service_NIFM, "(STUBBED) called");+ LOG_DEBUG(Service_NIFM, "(STUBBED) called");if (state == RequestState::NotSubmitted) {UpdateState(RequestState::OnHold);@@ -392,7 +392,7 @@ private:}void GetRequestState(HLERequestContext& ctx) {- LOG_WARNING(Service_NIFM, "(STUBBED) called");+ LOG_DEBUG(Service_NIFM, "(STUBBED) called");IPC::ResponseBuilder rb{ctx, 3};rb.Push(ResultSuccess);@@ -424,7 +424,7 @@ private:}void GetResult(HLERequestContext& ctx) {- LOG_WARNING(Service_NIFM, "(STUBBED) called");+ LOG_DEBUG(Service_NIFM, "(STUBBED) called");const auto result = [this] {const auto has_connection = Network::GetHostIPv4Address().has_value() &&@@ -486,7 +486,7 @@ private:}void UpdateState(RequestState new_state) {- LOG_WARNING(Service_NIFM, "(STUBBED) called");+ LOG_DEBUG(Service_NIFM, "(STUBBED) called");state = new_state;event1->Signal();}diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cppindex 466be26577..fb5157a658 100644--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp@@ -1377,13 +1377,17 @@ void TextureCacheRuntime::CopyImage(Image& dst, Image& src,// As per the size-compatible formats section of vulkan, copy manually via ReinterpretImage// these images that aren't size-compatibleif (BytesPerBlock(src.info.format) != BytesPerBlock(dst.info.format)) {- auto oneCopy = VideoCommon::ImageCopy{- .src_offset = VideoCommon::Offset3D(0, 0, 0),- .dst_offset = VideoCommon::Offset3D(0, 0, 0),- .extent = dst.info.size- };++ if (src.info.type == ImageType::Linear || dst.info.type == ImageType::Linear) {+ return;+ }++ auto oneCopy = VideoCommon::ImageCopy{.src_offset = VideoCommon::Offset3D(0, 0, 0),+ .dst_offset = VideoCommon::Offset3D(0, 0, 0),+ .extent = dst.info.size};return ReinterpretImage(dst, src, std::span{&oneCopy, 1});}+boost::container::small_vector<VkImageCopy, 16> vk_copies(copies.size());const VkImageAspectFlags aspect_mask = dst.AspectMask();ASSERT(aspect_mask == src.AspectMask());