Commit graph

85 commits

Author SHA1 Message Date
Fernando Sahmkow
9db159da71 SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
Kelebek1
42638691b5 Use spans over guest memory where possible instead of copying data. 2023-07-02 23:09:48 +01:00
Kelebek1
c7430e51e3 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
Fernando Sahmkow
ff3cf7c1d9 MemoryManager: Fix race conditions. 2023-04-28 23:53:02 +02:00
Max Dunbar
8b5becf71b Fixes 'Continous' typo 2023-03-29 19:26:12 -07:00
Liam
5be8a74b0c general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
arades79
60a68839ee remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
Merry
6b50650633 Revert "MemoryManager: use fastmem directly."
This reverts commit 7f18e3bb89.
2023-01-25 10:12:04 +00:00
Fernando Sahmkow
d777ec15f8 BufferBase: Don't ignore GPU pages. 2023-01-05 14:00:10 -05:00
Fernando Sahmkow
7f18e3bb89 MemoryManager: use fastmem directly. 2023-01-05 06:06:33 -05:00
Fernando Sahmkow
8eafb91af0 video_core: Cache GPU internal writes. 2023-01-05 05:23:39 -05:00
Fernando Sahmkow
3ea10762d2 RasterizerMemory: Add filtering for flushing/invalidation operations. 2023-01-01 16:43:58 -05:00
Fernando Sahmkow
12a76465b9 MacroHLE: Reduce massive calculations on sizing estimation. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
7842543573 MacroHLE: Add HLE replacement for base vertex and base instance. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
209ce46a9f MacroHLE: Add Index Buffer size estimation. 2023-01-01 16:43:57 -05:00
FengChen
2d53a37461 video_core: Implement memory manager page kind 2022-10-17 15:33:29 +08:00
Fernando Sahmkow
1595e77913 General: address feedback 2022-10-06 21:00:54 +02:00
Fernando Sahmkow
03a978b04b Buffer Cache: Deduce vertex array limit from memory layout when limit is the highest possible. 2022-10-06 21:00:53 +02:00
bunnei
616e83dd94 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
8f0981702a MemoryManager: Finish up the initial implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
67bb131e37 MemoryManager: initial multi paging system implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
0925f2386a Refactor VideoCore to use AS sepparate from Channel. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
19d8ea6bd6 NVDRV: Remake ASGPU 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
a4346d16ed VideoCore: Update MemoryManager 2022-10-06 21:00:51 +02:00
Morph
2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
Fernando Sahmkow
4a3a7673b7 Inline2Memory: Flush before writting buffer. 2022-01-29 17:42:28 +01:00
ameerj
5c644fe97b video_core/memory_manager: Deduplicate Read/WriteBlock 2021-12-31 02:08:22 -05:00
Fernando Sahmkow
73d501ed4b Texture Cache: Address feedback. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
083e0527fd Texture Cache: Improve accuracy of sparse texture detection. 2021-07-04 22:32:35 +02:00
ReinUsesLisp
cc201e3d82 Merge branch 'bytes-to-map-end' into new-bufcache-wip 2021-02-13 02:18:35 -03:00
ReinUsesLisp
70b3c29534 gpu: Report renderer errors with exceptions
Instead of using a two step initialization to report errors, initialize
the GPU renderer and rasterizer on the constructor and report errors
through std::runtime_error.
2021-02-13 02:16:19 -03:00
bunnei
15108fcea7 Merge pull request #5795 from ReinUsesLisp/bytes-to-map-end
video_core/memory_manager: Add BytesToMapEnd
2021-01-29 22:56:29 -08:00
ReinUsesLisp
0e885adf4a 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.
2021-01-22 18:31:12 -03:00
ReinUsesLisp
220ba5933c video_core/memory_manager: Remove unused CopyBlockUnsafe
This function was not being used.
2021-01-21 19:16:06 -03:00
ReinUsesLisp
5c2fdf4e60 video_core/memory_manager: Add GPU address based flush method
Allow flushing rasterizer contents based on a GPU address.
2021-01-21 19:16:05 -03:00
Lioncash
2f181b6a90 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.
2020-12-04 16:19:09 -05:00
ameerj
9ef5c53e52 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>
2020-10-26 23:07:36 -04:00
Lioncash
ad83996932 memory_manager: Make use of [[nodiscard]] in the interface 2020-08-26 20:15:03 -04:00
Lioncash
4ccecf6fec memory_manager: Make operator+ const qualified
This doesn't modify member state, so it can be marked as const.
2020-08-26 20:11:58 -04:00
bunnei
6d9165c252 Merge pull request #4574 from lioncash/const-fn
memory_manager: Mark IsGranularRange() as a const member function
2020-08-25 11:24:13 -04:00
Lioncash
9a974b8cb9 memory_manager: Mark IsGranularRange() as a const member function
This doesn't modify internal member state, so it can be marked as const.
2020-08-24 00:37:57 -04:00
ReinUsesLisp
1c61cf29b6 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.
2020-08-22 01:51:45 -03:00
bunnei
991aca142e hle: nvdrv: Rewrite of GPU memory management. 2020-07-26 00:49:43 -04:00
Lioncash
693ec509d7 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.
2020-06-19 22:02:58 -04:00
bunnei
5a461a7482 video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00
Fernando Sahmkow
f00f6bbdb6 Memory: Address Feedback. 2020-04-08 13:40:46 -04:00
Fernando Sahmkow
3e7aecbd3c GPUMemoryManager: Improve safety of memory reads. 2020-04-08 12:08:06 -04:00
Fernando Sahmkow
3728c7160f Buffer Cache: Use vAddr instead of physical memory. 2020-04-06 09:23:06 -04:00
Fernando Sahmkow
34be867080 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.
2020-03-14 09:43:57 -04:00
bunnei
f382179d47 Revert "video_core: memory_manager: Use GPU interface for cache functions." 2020-02-15 17:47:15 -05:00