Commit graph

103 commits

Author SHA1 Message Date
Max Dunbar
8b5becf71b Fixes 'Continous' typo 2023-03-29 19:26:12 -07:00
Liam
6eaef51cf2 memory: rename global memory references to application memory 2023-03-23 20:28:47 -04: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
9d1c9f1f58 video_core:Fix vmm kinds size error 2022-11-06 22:31:22 +08:00
Morph
afea768e8d general: Resolve -Wunused-but-set-variable 2022-10-22 15:02:04 -04:00
FengChen
2d53a37461 video_core: Implement memory manager page kind 2022-10-17 15:33:29 +08:00
Fernando Sahmkow
2f61540d44 General: Fix clang format. 2022-10-06 21:00:53 +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
a1b6ba1602 Memory Manager: ensure safety of GPU to CPU address. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
6a3eca65ea MemoryManager: Fix errors popping out. 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
bc66debfdc Texture cache: Fix the remaining issues with memory mnagement and unmapping. 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
80a4737010 MemoryManager: Temporary Fix for NVDEC. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
a4346d16ed VideoCore: Update MemoryManager 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
8847b6645c VideoCore: implement channels on gpu caches. 2022-10-06 21:00:51 +02:00
Kyle Kienapfel
ea00332a67 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
2022-08-19 16:08:40 -07:00
Liam
c1771c98f3 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04: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
ameerj
b837219423 video_core: Reduce unused includes 2022-03-19 15:01:31 -04:00
ameerj
4c10c0a514 video_core/memory_manager: Fixes for sparse memory management 2021-12-31 17:04:02 -05:00
ameerj
5c644fe97b video_core/memory_manager: Deduplicate Read/WriteBlock 2021-12-31 02:08:22 -05:00
Morph
421ff5ea79 video_core/memory_manager: Add missing <algorithm> include 2021-09-11 17:19:15 -04:00
Fernando Sahmkow
c01e168072 GPU_MemoryManger: Fix GetSubmappedRange. 2021-08-19 22:57:22 +02:00
FernandoS27
7d40446b99 shader: Address feedback 2021-07-22 21:51:25 -04:00
FernandoS27
8232c10ed1 shader: Implement TLD 2021-07-22 21:51:25 -04: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
Fernando Sahmkow
5854ca4ff0 Texture Cache: Initial Implementation of Sparse Textures. 2021-07-04 22:32:03 +02:00
ameerj
2a0dbf9b79 buffer_cache: Simplify uniform disabling logic 2021-06-01 13:26:58 -04:00
bunnei
ad048de3d6 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
bunnei
5dbcaa2970 hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable. 2021-02-18 16:16:25 -08: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
85390839b0 video_core/memory_manager: Flush destination buffer on CopyBlock
When we copy into a buffer, it might contain data modified from the GPU
on the same pages. Because of this, we have to flush the contents before
writing new data.

An alternative approach would be to write the data in place, but games
can also write data in other ways, invalidating our contents.

Fixes geometry in Zombie Panic in Wonderland DX.
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
ReinUsesLisp
d25b097e84 video_core: Rewrite the texture cache
The current texture cache has several points that hurt maintainability
and performance. It's easy to break unrelated parts of the cache
when doing minor changes. The cache can easily forget valuable
information about the cached textures by CPU writes or simply by its
normal usage.The current texture cache has several points that hurt
maintainability and performance. It's easy to break unrelated parts
of the cache when doing minor changes. The cache can easily forget
valuable information about the cached textures by CPU writes or simply
by its normal usage.

This commit aims to address those issues.
2020-12-30 03:38:50 -03: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