early-access version 4119
This commit is contained in:
parent
e0f3149c76
commit
4e075a8090
7 changed files with 25 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 4118.
|
This is the source code for early-access 4119.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,8 @@ NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) {
|
||||||
vm.va_range_end = params.va_range_end;
|
vm.va_range_end = params.va_range_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const u64 max_big_page_bits = Common::Log2Ceil64(vm.va_range_end);
|
||||||
|
|
||||||
const auto start_pages{static_cast<u32>(vm.va_range_start >> VM::PAGE_SIZE_BITS)};
|
const auto start_pages{static_cast<u32>(vm.va_range_start >> VM::PAGE_SIZE_BITS)};
|
||||||
const auto end_pages{static_cast<u32>(vm.va_range_split >> VM::PAGE_SIZE_BITS)};
|
const auto end_pages{static_cast<u32>(vm.va_range_split >> VM::PAGE_SIZE_BITS)};
|
||||||
vm.small_page_allocator = std::make_shared<VM::Allocator>(start_pages, end_pages);
|
vm.small_page_allocator = std::make_shared<VM::Allocator>(start_pages, end_pages);
|
||||||
|
@ -132,8 +134,8 @@ NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) {
|
||||||
static_cast<u32>((vm.va_range_end - vm.va_range_split) >> vm.big_page_size_bits)};
|
static_cast<u32>((vm.va_range_end - vm.va_range_split) >> vm.big_page_size_bits)};
|
||||||
vm.big_page_allocator = std::make_unique<VM::Allocator>(start_big_pages, end_big_pages);
|
vm.big_page_allocator = std::make_unique<VM::Allocator>(start_big_pages, end_big_pages);
|
||||||
|
|
||||||
gmmu = std::make_shared<Tegra::MemoryManager>(system, 40, vm.big_page_size_bits,
|
gmmu = std::make_shared<Tegra::MemoryManager>(system, max_big_page_bits, vm.va_range_split,
|
||||||
VM::PAGE_SIZE_BITS);
|
vm.big_page_size_bits, VM::PAGE_SIZE_BITS);
|
||||||
system.GPU().InitAddressSpace(*gmmu);
|
system.GPU().InitAddressSpace(*gmmu);
|
||||||
vm.initialised = true;
|
vm.initialised = true;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "common/hex_util.h"
|
#include "common/hex_util.h"
|
||||||
#include "common/microprofile.h"
|
#include "common/microprofile.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
|
#include "core/arm/debug.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hle/kernel/k_page_table.h"
|
#include "core/hle/kernel/k_page_table.h"
|
||||||
|
@ -63,7 +64,9 @@ void StandardVmCallbacks::MemoryWriteUnsafe(VAddr address, const void* data, u64
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
system.ApplicationMemory().WriteBlock(address, data, size);
|
if (system.ApplicationMemory().WriteBlock(address, data, size)) {
|
||||||
|
Core::InvalidateInstructionCacheRange(system.ApplicationProcess(), address, size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 StandardVmCallbacks::HidKeysDown() {
|
u64 StandardVmCallbacks::HidKeysDown() {
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Tegra::Host1x {
|
||||||
|
|
||||||
Host1x::Host1x(Core::System& system_)
|
Host1x::Host1x(Core::System& system_)
|
||||||
: system{system_}, syncpoint_manager{},
|
: system{system_}, syncpoint_manager{},
|
||||||
memory_manager(system.DeviceMemory()), gmmu_manager{system, memory_manager, 32, 12},
|
memory_manager(system.DeviceMemory()), gmmu_manager{system, memory_manager, 32, 0, 12},
|
||||||
allocator{std::make_unique<Common::FlatAllocator<u32, 0, 32>>(1 << 12)} {}
|
allocator{std::make_unique<Common::FlatAllocator<u32, 0, 32>>(1 << 12)} {}
|
||||||
|
|
||||||
Host1x::~Host1x() = default;
|
Host1x::~Host1x() = default;
|
||||||
|
|
|
@ -22,10 +22,11 @@ using Tegra::Memory::GuestMemoryFlags;
|
||||||
std::atomic<size_t> MemoryManager::unique_identifier_generator{};
|
std::atomic<size_t> MemoryManager::unique_identifier_generator{};
|
||||||
|
|
||||||
MemoryManager::MemoryManager(Core::System& system_, MaxwellDeviceMemoryManager& memory_,
|
MemoryManager::MemoryManager(Core::System& system_, MaxwellDeviceMemoryManager& memory_,
|
||||||
u64 address_space_bits_, u64 big_page_bits_, u64 page_bits_)
|
u64 address_space_bits_, GPUVAddr split_address_, u64 big_page_bits_,
|
||||||
|
u64 page_bits_)
|
||||||
: system{system_}, memory{memory_}, address_space_bits{address_space_bits_},
|
: system{system_}, memory{memory_}, address_space_bits{address_space_bits_},
|
||||||
page_bits{page_bits_}, big_page_bits{big_page_bits_}, entries{}, big_entries{},
|
split_address{split_address_}, page_bits{page_bits_}, big_page_bits{big_page_bits_},
|
||||||
page_table{address_space_bits, address_space_bits + page_bits - 38,
|
entries{}, big_entries{}, page_table{address_space_bits, address_space_bits + page_bits - 38,
|
||||||
page_bits != big_page_bits ? page_bits : 0},
|
page_bits != big_page_bits ? page_bits : 0},
|
||||||
kind_map{PTEKind::INVALID}, unique_identifier{unique_identifier_generator.fetch_add(
|
kind_map{PTEKind::INVALID}, unique_identifier{unique_identifier_generator.fetch_add(
|
||||||
1, std::memory_order_acq_rel)},
|
1, std::memory_order_acq_rel)},
|
||||||
|
@ -48,10 +49,10 @@ MemoryManager::MemoryManager(Core::System& system_, MaxwellDeviceMemoryManager&
|
||||||
entries.resize(page_table_size / 32, 0);
|
entries.resize(page_table_size / 32, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryManager::MemoryManager(Core::System& system_, u64 address_space_bits_, u64 big_page_bits_,
|
MemoryManager::MemoryManager(Core::System& system_, u64 address_space_bits_,
|
||||||
u64 page_bits_)
|
GPUVAddr split_address_, u64 big_page_bits_, u64 page_bits_)
|
||||||
: MemoryManager(system_, system_.Host1x().MemoryManager(), address_space_bits_, big_page_bits_,
|
: MemoryManager(system_, system_.Host1x().MemoryManager(), address_space_bits_, split_address_,
|
||||||
page_bits_) {}
|
big_page_bits_, page_bits_) {}
|
||||||
|
|
||||||
MemoryManager::~MemoryManager() = default;
|
MemoryManager::~MemoryManager() = default;
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,11 @@ namespace Tegra {
|
||||||
class MemoryManager final {
|
class MemoryManager final {
|
||||||
public:
|
public:
|
||||||
explicit MemoryManager(Core::System& system_, u64 address_space_bits_ = 40,
|
explicit MemoryManager(Core::System& system_, u64 address_space_bits_ = 40,
|
||||||
u64 big_page_bits_ = 16, u64 page_bits_ = 12);
|
GPUVAddr split_address = 1ULL << 34, u64 big_page_bits_ = 16,
|
||||||
explicit MemoryManager(Core::System& system_, MaxwellDeviceMemoryManager& memory_,
|
|
||||||
u64 address_space_bits_ = 40, u64 big_page_bits_ = 16,
|
|
||||||
u64 page_bits_ = 12);
|
u64 page_bits_ = 12);
|
||||||
|
explicit MemoryManager(Core::System& system_, MaxwellDeviceMemoryManager& memory_,
|
||||||
|
u64 address_space_bits_ = 40, GPUVAddr split_address = 1ULL << 34,
|
||||||
|
u64 big_page_bits_ = 16, u64 page_bits_ = 12);
|
||||||
~MemoryManager();
|
~MemoryManager();
|
||||||
|
|
||||||
static constexpr bool HAS_FLUSH_INVALIDATION = true;
|
static constexpr bool HAS_FLUSH_INVALIDATION = true;
|
||||||
|
@ -194,6 +195,7 @@ private:
|
||||||
MaxwellDeviceMemoryManager& memory;
|
MaxwellDeviceMemoryManager& memory;
|
||||||
|
|
||||||
const u64 address_space_bits;
|
const u64 address_space_bits;
|
||||||
|
GPUVAddr split_address;
|
||||||
const u64 page_bits;
|
const u64 page_bits;
|
||||||
u64 address_space_size;
|
u64 address_space_size;
|
||||||
u64 page_size;
|
u64 page_size;
|
||||||
|
|
|
@ -193,8 +193,7 @@ void ControllerShortcut::ControllerUpdateEvent(Core::HID::ControllerTriggerType
|
||||||
if (!Settings::values.controller_navigation) {
|
if (!Settings::values.controller_navigation) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (button_sequence.npad.raw == Core::HID::NpadButton::None &&
|
if (button_sequence.npad.raw == Core::HID::NpadButton::None) {
|
||||||
button_sequence.capture.raw == 0 && button_sequence.home.raw == 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue