video_core: 64 GiB device address space

Switch 2 titles map most of their memory twice plus GPU-only regions;
title 1 ran out of the 16 GiB SMMU space. The buffer cache page table and
memory tracker cover the wider space.
This commit is contained in:
Takoroka 2026-10-28 13:22:59 -04:00
commit 4fc2ffa89b
3 changed files with 6 additions and 3 deletions

View file

@ -544,7 +544,8 @@ private:
bool immediately_free = false;
#endif
std::array<BufferId, ((1ULL << 34) >> CACHING_PAGEBITS)> page_table;
// Covers the device address space (MaxwellDeviceTraits::device_virtual_bits).
std::array<BufferId, ((1ULL << 36) >> CACHING_PAGEBITS)> page_table;
Common::ScratchBuffer<u8> tmp_buffer;
};

View file

@ -22,7 +22,7 @@ namespace VideoCommon {
template <typename DeviceTracker>
class MemoryTrackerBase {
static constexpr size_t MAX_CPU_PAGE_BITS = 34;
static constexpr size_t MAX_CPU_PAGE_BITS = 36; // device addresses (MaxwellDeviceTraits)
static constexpr size_t HIGHER_PAGE_BITS = 22;
static constexpr size_t HIGHER_PAGE_SIZE = 1ULL << HIGHER_PAGE_BITS;
static constexpr size_t HIGHER_PAGE_MASK = HIGHER_PAGE_SIZE - 1ULL;

View file

@ -14,7 +14,9 @@ namespace Tegra {
struct MaxwellDeviceMethods;
struct MaxwellDeviceTraits {
static constexpr size_t device_virtual_bits = 34;
// 64 GiB: Switch 2 titles map most of their memory twice plus GPU-only regions (title 1
// ran out of 16 GiB).
static constexpr size_t device_virtual_bits = 36;
using DeviceInterface = typename VideoCore::RasterizerInterface;
using DeviceMethods = MaxwellDeviceMethods;
};