Commit graph

36 commits

Author SHA1 Message Date
Kelebek1 7464cae24b Rework Nvdec and VIC to fix out-of-order videos, and speed up decoding. 2024-03-03 17:15:46 +00:00
Fernando Sahmkow b0bca0f8b0 SMMU: Fix software rendering and cleanup 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 303cd31162 SMMU: Add Android compatibility 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 96fd1348ae GPU SMMU: Expand to 34 bits 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 0a2536a0df SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 7a9d1ad2f8 NVDRV: Implement sessions and initial implementation of SMMU 2024-01-18 21:12:30 -05:00
Liam 723df0f368 nvdrv: rework to remove memcpy 2023-10-25 13:05:56 -04:00
Liam 94b7ac50bb nvdrv: fix up remaining copy calls 2023-10-25 13:05:56 -04:00
Liam efdb2e8f3d nvdrv: convert codec devices 2023-10-25 13:05:56 -04:00
Kelebek1 5da70f7197 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
Liam 41d99aa89d memory: rename global memory references to application memory 2023-03-23 20:28:47 -04:00
ameerj 2d2522693e Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"
This reverts commit 25fc5c0e11, reversing
changes made to af20e25081.
2023-02-03 00:08:45 -05:00
liamwhite b01698775b
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" 2023-02-02 15:53:28 -05:00
ameerj f517f82416 nvdrv: Use std::span for inputs
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:53 -05:00
Fernando Sahmkow ca3db0d7c9 General: address feedback 2022-10-06 21:00:54 +02:00
Fernando Sahmkow d97d409647 NvHostChannels: improve hack for supporting multiple channels. 2022-10-06 21:00:54 +02:00
Fernando Sahmkow 8d774e7415 NvDec: Fix regressions. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow a9ca39f859 NVDRV: Further improvements. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 2931101e6f NVDRV: Refactor Host1x 2022-10-06 21:00:52 +02:00
Fernando Sahmkow af35dbcf63 NVDRV: Fix Open/Close and make sure each device is correctly created. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow de0e8eff42 NVDRV: Implement new NvMap 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 3cbe352c18 NVDRV: Refactor and add new NvMap. 2022-10-06 21:00:51 +02:00
Morph 99ceb03a1c 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
Feng Chen 2c47f8aa18 Support multiple videos playing 2021-12-02 12:48:42 +08:00
Billy Laws 2dbef58eeb Fixup channel submit IOCTL syncpoint parameters
The current arguments worked by happenstance as games only ever submit
one syncpoint and request one fence back, if a game were to do something
other than this then the arguments would've been parsed entirely wrong.
2021-10-24 00:01:35 +01:00
ameerj 156ea746a3 nvhost_nvdec_common: Remove BufferMap
This was mainly used to keep track of mapped buffers for later unmapping.  Since unmap is no longer implemented, this no longer seves a valuable purpose.
2021-08-06 20:11:12 -04:00
ameerj cc8ac112fc nvhost_nvdec_common: Stub UnmapBuffer Ioctl
Skip unmapping nvdec buffers to avoid breaking the continuity of the VP9 reference frame addresses, and the risk of invalidating data before the async GPU thread is done with it.
2021-08-06 20:06:30 -04:00
ameerj 8943f2158d nvhost_nvdec_common: Read Submit ioctl data from object addr
Fixes Mario Golf intro video decoding.
2021-07-14 23:56:24 -04:00
ameerj 3f601ed8bc nvhost_nvdec_common: Fix {Slice/Write}Vectors return
Plus some minor cleanup for consistency.
2021-07-14 22:30:58 -04:00
Lioncash 9e726a9250 service: Resolve cases of member field shadowing
Now all that remains is for kernel code to be 'shadow-free' and then
-Wshadow can be turned into an error.
2021-05-04 04:38:38 -04:00
lat9nq 2cc42e40c5 nvhost_nvdec_common: Avoid memcpy with null pointers
Avoid sending null pointer to memcpy as reported by Undefined Behavious
Sanitizer.

Co-authored-by: LC <mathew1800@gmail.com>
2021-04-05 16:40:03 -04:00
ameerj 06cef3355e fix for nvdec disabled, cleanup host1x 2021-01-07 14:33:45 -05:00
ameerj 2c27127d04 nvdec syncpt incorporation
laying the groundwork for async gpu, although this does not fully implement async nvdec operations
2021-01-07 14:33:45 -05:00
Chloe Marcec 31c12de0fe core: Make nvservices more standardized 2020-11-10 15:57:35 +11:00
Jan Beich 50e52ade85 video_core: unbreak -Werror in NVDEC with Clang
src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp:41:15: error: unused variable 'OutOfMemory' [-Werror,-Wunused-const-variable]
constexpr u32 OutOfMemory{static_cast<u32>(-12)};
              ^
2020-10-30 16:43:10 +00:00
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>
2020-10-26 23:07:36 -04:00