Lioncash
cb867f250a
video_core/memory_manager: Default the destructor within the cpp file
Makes the class less surprising when it comes to forward declaring the
type, and also prevents inlining the destruction code of the class,
given it contains non-trivial types.
7 years ago
Fernando Sahmkow
54ede7cc0a
make ReadBlockunsafe and WriteBlockunsafe, ignore invalid pages.
7 years ago
Fernando Sahmkow
ad686a3c0d
Implement IsBlockContinous
This detects when a GPU Memory Block is not continous within host cpu
memory.
7 years ago
Fernando Sahmkow
86d3cb5fa7
Document unsafe versions and add BlockCopyUnsafe
7 years ago
Fernando Sahmkow
b33c627670
Use ReadBlockUnsafe on TIC and TSC reading
Use ReadBlockUnsafe on TIC and TSC reading as memory is never flushed
from host GPU there.
7 years ago
Fernando Sahmkow
57051db434
GPU MemoryManager: Implement ReadBlockUnsafe and WriteBlockUnsafe
7 years ago
bunnei
2a4a454793
memory_manager: Improved implementation of read/write/copy block.
- Fixes graphical issues with Chocobo's Mystery Dungeon EVERY BUDDY!
- Fixes a crash with Mario Tennis Aces
7 years ago
Lioncash
69846b1557
video_core/memory_manager: Make Read() a const qualified member function
Given this doesn't actually alter internal state, this can be made a
const member function.
7 years ago
Lioncash
e36500c07f
video_core/memory_manager: Make ReadBlock() a const qualifier member function
Now, since we have a const qualified variant of GetPointer(), we can put
it to use in ReadBlock() to retrieve the source pointer that is passed
into memcpy.
Now block reading may be done from a const context.
7 years ago
Lioncash
514351af96
video_core/memory_manager: Add a const qualified variant of GetPointer()
Allows retrieving read-only pointers from a const context externally.
7 years ago
Lioncash
72e8ac8e4e
video_core/memory_manager: Make FindFreeRegion() a const member function
This doesn't modify internal state, so it can be made a const member
function.
7 years ago
Lioncash
ad244b004b
video_core/memory_manager: Make GpuToCpuAddress() a const member function
This doesn't modify any internal state, so it can be made a const member
function to allow its use in const contexts.
7 years ago
bunnei
51cdb0df88
memory_manager: Cleanup FindFreeRegion.
7 years ago
bunnei
c04b7bd60c
memory_manager: Use Common::AlignUp in public interface as needed.
7 years ago
bunnei
7521cd30d1
memory_manager: Bug fixes and further cleanup.
7 years ago
bunnei
bb6e007a63
memory_manager: Add protections for invalid GPU addresses.
- Avoid a crash in Xenoblade Chronicles 2.
7 years ago
bunnei
fa405371ee
gpu: Rewrite virtual memory manager using PageTable.
7 years ago
bunnei
d3f26c1546
video_core: Refactor to use MemoryManager interface for all memory access.
# Conflicts:
# src/video_core/engines/kepler_memory.cpp
# src/video_core/engines/maxwell_3d.cpp
# src/video_core/morton.cpp
# src/video_core/morton.h
# src/video_core/renderer_opengl/gl_global_cache.cpp
# src/video_core/renderer_opengl/gl_global_cache.h
# src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
7 years ago
ReinUsesLisp
36ccfac47b
memory_manager: Check for reserved page status
7 years ago
bunnei
ae72f4154e
memory_manager: Do not allow 0 to be a valid GPUVAddr.
- Fixes a bug with Undertale using 0 for a render target.
7 years ago
bunnei
938dd94181
memory_manager: Do not MapBufferEx over already in use memory.
- This fixes rendering when changing areas in Super Mario Odyssey.
7 years ago
Frederic L
c76f4b6aec
global: Use std::optional instead of boost::optional ( #1578 )
* get rid of boost::optional
* Remove optional references
* Use std::reference_wrapper for optional references
* Fix clang format
* Fix clang format part 2
* Adressed feedback
* Fix clang format and MacOS build
7 years ago
bunnei
ac8ab8f305
memory_manager: Add a method for querying the end of a mapped GPU region.
7 years ago
Lioncash
4cab632ba6
video_core/memory_manager: Replace a loop with std::array's fill() function in PageSlot()
We already have a function that does what this code was doing, so let's
use that instead.
8 years ago
Lioncash
38ad89a19b
video_core/memory_manager: Avoid repeated unnecessary page slot lookups
We don't need to keep calling the same function over and over again in a
loop, especially when the behavior is slightly non-trivial. We can just
keep a reference to the looked up location and do all the checking and
assignments based off it instead.
8 years ago
Subv
40d52181c3
GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses.
8 years ago
Subv
9abfc3df7b
GPU: Implemented nvhost-as-gpu's UnmapBuffer ioctl.
It removes a mapping previously created with the MapBufferEx ioctl.
8 years ago
bunnei
995cbfc15f
memory_manager: Add implement CpuToGpuAddress.
8 years ago
bunnei
b6bed8fd74
memory_manager: Make GpuToCpuAddress return an optional.
8 years ago
bunnei
ebef12f037
memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses.
8 years ago
Subv
fbc480d611
GPU: Make the GPU virtual memory manager use 16 page bits and 10 page table bits.
Also removed some dead code and added memory map consistency asserts.
8 years ago
Subv
0088b3128b
Make a GPU class in VideoCore to contain the GPU state.
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
8 years ago
bunnei
0fb50d9aa1
nvdrv: Add MemoryManager class to track GPU memory.
8 years ago