ReinUsesLisp
bda177ef40
video_core/memory_manager: Add BytesToMapEnd
Track map address sizes in a flat ordered map and add a method to query
the number of bytes until the end of a map in a given address.
5 years ago
ReinUsesLisp
b7febb5625
video_core/memory_manager: Remove unused CopyBlockUnsafe
This function was not being used.
5 years ago
ReinUsesLisp
dd790abab0
video_core/memory_manager: Add GPU address based flush method
Allow flushing rasterizer contents based on a GPU address.
5 years ago
Lioncash
677a8b208d
video_core: Resolve more variable shadowing scenarios
Resolves variable shadowing scenarios up to the end of the OpenGL code
to make it nicer to review. The rest will be resolved in a following
commit.
5 years ago
ameerj
eb67a45ca8
video_core: NVDEC Implementation
This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library.
The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data.
To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library.
Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header.
Async GPU is not properly implemented at the moment.
Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
6 years ago
Lioncash
7b50c48df7
memory_manager: Make use of [[nodiscard]] in the interface
6 years ago
Lioncash
d12d59f62a
memory_manager: Make operator+ const qualified
This doesn't modify member state, so it can be marked as const.
6 years ago
Lioncash
5bce81c3d6
memory_manager: Mark IsGranularRange() as a const member function
This doesn't modify internal member state, so it can be marked as const.
6 years ago
ReinUsesLisp
da53bcee60
video_core: Initialize renderer with a GPU
Add an extra step in GPU initialization to be able to initialize render
backends with a valid GPU instance.
6 years ago
bunnei
05def61398
hle: nvdrv: Rewrite of GPU memory management.
6 years ago
Lioncash
479605b3e5
memory_manager: Eliminate variable shadowing
Renames some variables to prevent ones in inner scopes from shadowing
outer-scoped variables.
The Copy* functions have no shadowing, but we rename them anyways to
remain consistent with the other functions.
6 years ago
bunnei
32fc2aae3c
video_core: memory_manager: Updates for Common::PageTable changes.
6 years ago
Fernando Sahmkow
913f42a3a7
Memory: Address Feedback.
6 years ago
Fernando Sahmkow
e00d992848
GPUMemoryManager: Improve safety of memory reads.
6 years ago
Fernando Sahmkow
7fcd0fee6d
Buffer Cache: Use vAddr instead of physical memory.
6 years ago
Fernando Sahmkow
27cbb75e7c
PageTable: move backing addresses to a children class as the CPU page table does not need them.
This PR aims to reduce the memory usage in the CPU page table by moving
GPU specific parameters into a child class. This saves 1Gb of Memory for
most games.
6 years ago
bunnei
0f70f68fb3
Revert "video_core: memory_manager: Use GPU interface for cache functions."
6 years ago
bunnei
7cacb08cdf
video_core: memory_manager: Use GPU interface for cache functions.
6 years ago
Michael Scire
a1845d1dd3
prefer system reference over global accessor
7 years ago
Fernando Sahmkow
f79823fda7
GPUVM: Correct GPU VM virtual address space
7 years ago
Lioncash
716fbaef74
video_core/memory_manager: Mark IsBlockContinuous() as a const member function
Corrects the typo in its name and marks the function as a const member
function, given it doesn't actually modify memory manager state.
7 years ago
Lioncash
d4bcd006b2
video_core/memory_manager: Mark the constructor as explicit
Prevents implicit converting constructions of the memory manager.
7 years ago
Lioncash
fd12788967
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
Lioncash
53afe47cec
video_core/memory_manager: Amend doxygen comments
Corrects references to non-existent parameters and corrects typos.
7 years ago
Lioncash
5235b053b4
video_core/memory_manager: Remove superfluous const from function declarations
These are able to be omitted from the declaration of functions, since
they don't do anything at the type system level. The definitions of the
functions can retain the use of const though, since they make the
variables immutable in the implementation of the function where they're
used.
7 years ago
Fernando Sahmkow
d0082de82a
Implement IsBlockContinous
This detects when a GPU Memory Block is not continous within host cpu
memory.
7 years ago
Fernando Sahmkow
13d626fc21
Use ReadBlockUnsafe for fetyching DMA CommandLists
7 years ago
Fernando Sahmkow
06d1c5a991
Document unsafe versions and add BlockCopyUnsafe
7 years ago
Fernando Sahmkow
367704aa82
GPU MemoryManager: Implement ReadBlockUnsafe and WriteBlockUnsafe
7 years ago
bunnei
20be92d5e6
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
c13fbe6a41
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
76ef6e5c2b
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
34510bcda8
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
085b388a7a
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
9dec087fca
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
2117edd0f8
memory_manager: Cleanup FindFreeRegion.
7 years ago
bunnei
72837e4b3d
memory_manager: Bug fixes and further cleanup.
7 years ago
bunnei
197dcf0b5e
memory_manager: Add protections for invalid GPU addresses.
- Avoid a crash in Xenoblade Chronicles 2.
7 years ago
bunnei
22d3dfbcd4
gpu: Rewrite virtual memory manager using PageTable.
7 years ago
bunnei
241563d15c
gpu: Move GPUVAddr definition to common_types.
7 years ago
bunnei
574e89d924
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
bunnei
0b1842294f
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
4aa9779ae1
memory_manager: Do not MapBufferEx over already in use memory.
- This fixes rendering when changing areas in Super Mario Odyssey.
8 years ago
Frederic L
7a5eda5914
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
8 years ago
bunnei
37575eae65
memory_manager: Add a method for querying the end of a mapped GPU region.
8 years ago
Subv
72b5c448cf
GPU: Implemented nvhost-as-gpu's UnmapBuffer ioctl.
It removes a mapping previously created with the MapBufferEx ioctl.
8 years ago
bunnei
4415e00181
gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses.
8 years ago
bunnei
10c6d89119
memory_manager: Add implement CpuToGpuAddress.
8 years ago
bunnei
239ac8abe2
memory_manager: Make GpuToCpuAddress return an optional.
8 years ago
bunnei
9e11a76e92
memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses.
8 years ago