Skip to content

Commit

Permalink
buffer_cache: Bump usable address space to 40bits
Browse files Browse the repository at this point in the history
* Fixes crashes in games that use the upper region of user area
  • Loading branch information
raphaelthegreat committed Dec 6, 2024
1 parent 9e618c0 commit 6acfdd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/video_core/buffer_cache/buffer_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BufferCache {

struct Traits {
using Entry = BufferId;
static constexpr size_t AddressSpaceBits = 39;
static constexpr size_t AddressSpaceBits = 40;
static constexpr size_t FirstLevelBits = 14;
static constexpr size_t PageBits = CACHING_PAGEBITS;
};
Expand Down
2 changes: 1 addition & 1 deletion src/video_core/buffer_cache/memory_tracker_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace VideoCore {

class MemoryTracker {
public:
static constexpr size_t MAX_CPU_PAGE_BITS = 39;
static constexpr size_t MAX_CPU_PAGE_BITS = 40;
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;
Expand Down

0 comments on commit 6acfdd5

Please sign in to comment.