Compare commits
3 Commits
android-14
...
android-14
Author | SHA1 | Date | |
---|---|---|---|
1d3c18f139 | |||
08e54b81c3 | |||
1bc96dd445 |
@ -1,7 +1,7 @@
|
|||||||
| Pull Request | Commit | Title | Author | Merged? |
|
| Pull Request | Commit | Title | Author | Merged? |
|
||||||
|----|----|----|----|----|
|
|----|----|----|----|----|
|
||||||
| [12235](https://github.com/yuzu-emu/yuzu//pull/12235) | [`e7dd968ac`](https://github.com/yuzu-emu/yuzu//pull/12235/files) | renderer_vulkan: adjust window origin and swizzle independently | [liamwhite](https://github.com/liamwhite/) | Yes |
|
| [12235](https://github.com/yuzu-emu/yuzu//pull/12235) | [`e7dd968ac`](https://github.com/yuzu-emu/yuzu//pull/12235/files) | renderer_vulkan: adjust window origin and swizzle independently | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||||
| [12263](https://github.com/yuzu-emu/yuzu//pull/12263) | [`45b616158`](https://github.com/yuzu-emu/yuzu//pull/12263/files) | file_sys: handle null romfs | [liamwhite](https://github.com/liamwhite/) | Yes |
|
| [12256](https://github.com/yuzu-emu/yuzu//pull/12256) | [`d74dd4faf`](https://github.com/yuzu-emu/yuzu//pull/12256/files) | vk_blit_screen: Use correct format for fxaa renderpass | [GPUCode](https://github.com/GPUCode/) | Yes |
|
||||||
|
|
||||||
|
|
||||||
End of merge log. You can find the original README.md below the break.
|
End of merge log. You can find the original README.md below the break.
|
||||||
|
@ -123,6 +123,9 @@ int EmulationSession::InstallFileToNand(std::string filename, std::string file_e
|
|||||||
ErrorFilenameExtension = 4,
|
ErrorFilenameExtension = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m_system.SetContentProvider(std::make_unique<FileSys::ContentProviderUnion>());
|
||||||
|
m_system.GetFileSystemController().CreateFactories(*m_vfs);
|
||||||
|
|
||||||
[[maybe_unused]] std::shared_ptr<FileSys::NSP> nsp;
|
[[maybe_unused]] std::shared_ptr<FileSys::NSP> nsp;
|
||||||
if (file_extension == "nsp") {
|
if (file_extension == "nsp") {
|
||||||
nsp = std::make_shared<FileSys::NSP>(m_vfs->OpenFile(filename, FileSys::Mode::Read));
|
nsp = std::make_shared<FileSys::NSP>(m_vfs->OpenFile(filename, FileSys::Mode::Read));
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
|
|
||||||
#ifndef MAP_NORESERVE
|
|
||||||
#define MAP_NORESERVE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // ^^^ Linux ^^^
|
#endif // ^^^ Linux ^^^
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@ -408,16 +404,6 @@ static void* ChooseVirtualBase(size_t virtual_size) {
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
static void* ChooseVirtualBase(size_t virtual_size) {
|
static void* ChooseVirtualBase(size_t virtual_size) {
|
||||||
#if defined(__FreeBSD__)
|
|
||||||
void* virtual_base =
|
|
||||||
mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE,
|
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_ALIGNED_SUPER, -1, 0);
|
|
||||||
|
|
||||||
if (virtual_base != MAP_FAILED) {
|
|
||||||
return virtual_base;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE,
|
return mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE,
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
|
||||||
}
|
}
|
||||||
@ -473,12 +459,24 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Virtual memory initialization
|
// Virtual memory initialization
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
virtual_base =
|
||||||
|
static_cast<u8*>(mmap(nullptr, virtual_size, PROT_NONE,
|
||||||
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_ALIGNED_SUPER, -1, 0));
|
||||||
|
if (virtual_base == MAP_FAILED) {
|
||||||
|
virtual_base = static_cast<u8*>(
|
||||||
|
mmap(nullptr, virtual_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));
|
||||||
|
if (virtual_base == MAP_FAILED) {
|
||||||
|
LOG_CRITICAL(HW_Memory, "mmap failed: {}", strerror(errno));
|
||||||
|
throw std::bad_alloc{};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
virtual_base = virtual_map_base = static_cast<u8*>(ChooseVirtualBase(virtual_size));
|
virtual_base = virtual_map_base = static_cast<u8*>(ChooseVirtualBase(virtual_size));
|
||||||
if (virtual_base == MAP_FAILED) {
|
if (virtual_base == MAP_FAILED) {
|
||||||
LOG_CRITICAL(HW_Memory, "mmap failed: {}", strerror(errno));
|
LOG_CRITICAL(HW_Memory, "mmap failed: {}", strerror(errno));
|
||||||
throw std::bad_alloc{};
|
throw std::bad_alloc{};
|
||||||
}
|
}
|
||||||
#if defined(__linux__)
|
|
||||||
madvise(virtual_base, virtual_size, MADV_HUGEPAGE);
|
madvise(virtual_base, virtual_size, MADV_HUGEPAGE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -429,6 +429,10 @@ VirtualFile PatchManager::PatchRomFS(const NCA* base_nca, VirtualFile base_romfs
|
|||||||
LOG_DEBUG(Loader, "{}", log_string);
|
LOG_DEBUG(Loader, "{}", log_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (base_romfs == nullptr) {
|
||||||
|
return base_romfs;
|
||||||
|
}
|
||||||
|
|
||||||
auto romfs = base_romfs;
|
auto romfs = base_romfs;
|
||||||
|
|
||||||
// Game Updates
|
// Game Updates
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common/assert.h"
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
@ -102,30 +101,24 @@ void ProcessDirectory(const VirtualFile& file, std::size_t dir_offset, std::size
|
|||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
VirtualDir ExtractRomFS(VirtualFile file) {
|
VirtualDir ExtractRomFS(VirtualFile file) {
|
||||||
auto root_container = std::make_shared<VectorVfsDirectory>();
|
|
||||||
if (!file) {
|
|
||||||
return root_container;
|
|
||||||
}
|
|
||||||
|
|
||||||
RomFSHeader header{};
|
RomFSHeader header{};
|
||||||
if (file->ReadObject(&header) != sizeof(RomFSHeader)) {
|
if (file->ReadObject(&header) != sizeof(RomFSHeader))
|
||||||
return root_container;
|
return nullptr;
|
||||||
}
|
|
||||||
|
|
||||||
if (header.header_size != sizeof(RomFSHeader)) {
|
if (header.header_size != sizeof(RomFSHeader))
|
||||||
return root_container;
|
return nullptr;
|
||||||
}
|
|
||||||
|
|
||||||
const u64 file_offset = header.file_meta.offset;
|
const u64 file_offset = header.file_meta.offset;
|
||||||
const u64 dir_offset = header.directory_meta.offset;
|
const u64 dir_offset = header.directory_meta.offset;
|
||||||
|
|
||||||
|
auto root_container = std::make_shared<VectorVfsDirectory>();
|
||||||
|
|
||||||
ProcessDirectory(file, dir_offset, file_offset, header.data_offset, 0, root_container);
|
ProcessDirectory(file, dir_offset, file_offset, header.data_offset, 0, root_container);
|
||||||
|
|
||||||
if (auto root = root_container->GetSubdirectory(""); root) {
|
if (auto root = root_container->GetSubdirectory(""); root) {
|
||||||
return std::make_shared<CachedVfsDirectory>(std::move(root));
|
return std::make_shared<CachedVfsDirectory>(std::move(root));
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(false);
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader, ContentProvider& provi
|
|||||||
: content_provider{provider}, filesystem_controller{controller} {
|
: content_provider{provider}, filesystem_controller{controller} {
|
||||||
// Load the RomFS from the app
|
// Load the RomFS from the app
|
||||||
if (app_loader.ReadRomFS(file) != Loader::ResultStatus::Success) {
|
if (app_loader.ReadRomFS(file) != Loader::ResultStatus::Success) {
|
||||||
LOG_WARNING(Service_FS, "Unable to read base RomFS");
|
LOG_ERROR(Service_FS, "Unable to read RomFS!");
|
||||||
}
|
}
|
||||||
|
|
||||||
updatable = app_loader.IsRomFSUpdatable();
|
updatable = app_loader.IsRomFSUpdatable();
|
||||||
|
@ -74,8 +74,10 @@ AppLoader_NCA::LoadResult AppLoader_NCA::Load(Kernel::KProcess& process, Core::S
|
|||||||
return load_result;
|
return load_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nca->GetRomFS() != nullptr && nca->GetRomFS()->GetSize() > 0) {
|
||||||
system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>(
|
system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>(
|
||||||
*this, system.GetContentProvider(), system.GetFileSystemController()));
|
*this, system.GetContentProvider(), system.GetFileSystemController()));
|
||||||
|
}
|
||||||
|
|
||||||
is_loaded = true;
|
is_loaded = true;
|
||||||
return load_result;
|
return load_result;
|
||||||
|
@ -1439,7 +1439,7 @@ void Image::UploadMemory(const StagingBufferRef& map, std::span<const BufferImag
|
|||||||
UploadMemory(map.buffer, map.offset, copies);
|
UploadMemory(map.buffer, map.offset, copies);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Image::DownloadMemory(VkBuffer buffer, size_t offset,
|
void Image::DownloadMemory(VkBuffer buffer, VkDeviceSize offset,
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies) {
|
std::span<const VideoCommon::BufferImageCopy> copies) {
|
||||||
std::array buffer_handles{
|
std::array buffer_handles{
|
||||||
buffer,
|
buffer,
|
||||||
@ -1450,7 +1450,7 @@ void Image::DownloadMemory(VkBuffer buffer, size_t offset,
|
|||||||
DownloadMemory(buffer_handles, buffer_offsets, copies);
|
DownloadMemory(buffer_handles, buffer_offsets, copies);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Image::DownloadMemory(std::span<VkBuffer> buffers_span, std::span<size_t> offsets_span,
|
void Image::DownloadMemory(std::span<VkBuffer> buffers_span, std::span<VkDeviceSize> offsets_span,
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies) {
|
std::span<const VideoCommon::BufferImageCopy> copies) {
|
||||||
const bool is_rescaled = True(flags & ImageFlagBits::Rescaled);
|
const bool is_rescaled = True(flags & ImageFlagBits::Rescaled);
|
||||||
if (is_rescaled) {
|
if (is_rescaled) {
|
||||||
@ -1530,7 +1530,7 @@ void Image::DownloadMemory(const StagingBufferRef& map, std::span<const BufferIm
|
|||||||
map.buffer,
|
map.buffer,
|
||||||
};
|
};
|
||||||
std::array offsets{
|
std::array offsets{
|
||||||
static_cast<size_t>(map.offset),
|
map.offset,
|
||||||
};
|
};
|
||||||
DownloadMemory(buffers, offsets, copies);
|
DownloadMemory(buffers, offsets, copies);
|
||||||
}
|
}
|
||||||
|
@ -147,10 +147,10 @@ public:
|
|||||||
void UploadMemory(const StagingBufferRef& map,
|
void UploadMemory(const StagingBufferRef& map,
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies);
|
std::span<const VideoCommon::BufferImageCopy> copies);
|
||||||
|
|
||||||
void DownloadMemory(VkBuffer buffer, size_t offset,
|
void DownloadMemory(VkBuffer buffer, VkDeviceSize offset,
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies);
|
std::span<const VideoCommon::BufferImageCopy> copies);
|
||||||
|
|
||||||
void DownloadMemory(std::span<VkBuffer> buffers, std::span<size_t> offsets,
|
void DownloadMemory(std::span<VkBuffer> buffers, std::span<VkDeviceSize> offsets,
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies);
|
std::span<const VideoCommon::BufferImageCopy> copies);
|
||||||
|
|
||||||
void DownloadMemory(const StagingBufferRef& map,
|
void DownloadMemory(const StagingBufferRef& map,
|
||||||
|
@ -995,7 +995,7 @@ void TextureCache<P>::DownloadImageIntoBuffer(typename TextureCache<P>::Image* i
|
|||||||
buffer,
|
buffer,
|
||||||
download_map.buffer,
|
download_map.buffer,
|
||||||
};
|
};
|
||||||
std::array<size_t, 2> buffer_offsets{
|
std::array<u64, 2> buffer_offsets{
|
||||||
buffer_offset,
|
buffer_offset,
|
||||||
download_map.offset,
|
download_map.offset,
|
||||||
};
|
};
|
||||||
|
@ -2713,6 +2713,11 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto base_romfs = base_nca->GetRomFS();
|
const auto base_romfs = base_nca->GetRomFS();
|
||||||
|
if (!base_romfs) {
|
||||||
|
failed();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto dump_dir =
|
const auto dump_dir =
|
||||||
target == DumpRomFSTarget::Normal
|
target == DumpRomFSTarget::Normal
|
||||||
? Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)
|
? Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)
|
||||||
|
Reference in New Issue
Block a user