diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 41db7df4b5e..aa116fa3d84 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -101,13 +101,17 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size, auto dmem_area = FindDmemArea(search_start); const auto is_suitable = [&] { + if (dmem_area == dmem_map.end()) { + return false; + } const auto aligned_base = Common::AlignUp(dmem_area->second.base, alignment); const auto alignment_size = aligned_base - dmem_area->second.base; const auto remaining_size = dmem_area->second.size >= alignment_size ? dmem_area->second.size - alignment_size : 0; return dmem_area->second.is_free && remaining_size >= size; }; - while (!is_suitable() && dmem_area->second.GetEnd() <= search_end) { + while (dmem_area != dmem_map.end() && !is_suitable() && + dmem_area->second.GetEnd() <= search_end) { ++dmem_area; } ASSERT_MSG(is_suitable(), "Unable to find free direct memory area: size = {:#x}", size); diff --git a/src/emulator.cpp b/src/emulator.cpp index 252a3441813..11a9f42f214 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -311,8 +311,9 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string found_modules, [&](const auto& path) { return path.filename() == module_name; }); if (it != found_modules.end()) { LOG_INFO(Loader, "Loading {}", it->string()); - linker->LoadModule(*it); - continue; + if (linker->LoadModule(*it) != -1) { + continue; + } } if (init_func) { LOG_INFO(Loader, "Can't Load {} switching to HLE", module_name); diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index f6b2e2bebf5..de108843b7d 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -25,6 +25,7 @@ static vk::Format DemoteImageFormatForDetiling(vk::Format format) { switch (format) { case vk::Format::eR8Uint: case vk::Format::eR8Unorm: + case vk::Format::eR8Snorm: return vk::Format::eR8Uint; case vk::Format::eR4G4B4A4UnormPack16: case vk::Format::eB5G6R5UnormPack16: @@ -41,6 +42,7 @@ static vk::Format DemoteImageFormatForDetiling(vk::Format format) { case vk::Format::eR8G8B8A8Snorm: case vk::Format::eR8G8B8A8Uint: case vk::Format::eR32Sfloat: + case vk::Format::eD32Sfloat: case vk::Format::eR32Uint: case vk::Format::eR16G16Sfloat: case vk::Format::eR16G16Unorm: