Commit graph

170 commits

Author SHA1 Message Date
lizzie
5091759a47
[vk, opengl] defer checks to topmost call (avoid unnecessary call) (#40)
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/40
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-07-13 03:40:48 +02:00
darktux
616619c8f7 Port changes from Early Access 2025-04-04 03:40:46 +02:00
Liam
e15b1021a4 video_core: make gpu context aware of rendering program 2024-02-26 11:16:14 -05:00
Liam
ce72818075 nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
Liam
5ec76db392 nvnflinger/gpu: implement layer stack composition 2024-01-31 11:27:21 -05:00
Fernando Sahmkow
9db159da71 SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow
4f68a8f45a Memory Tracking: Optimize tracking to only use atomic writes when contested with the host GPU 2023-06-28 21:32:45 +02:00
Fernando Sahmkow
6bc60f78d9 GPU: Add Reactive flushing 2023-05-07 23:46:12 +02:00
Fernando Sahmkow
a87ff9181b GPU: Implement additional render target formats. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow
41b3ddbbae Fermi2D: Implement Bilinear software filtering and address feedback. 2022-11-24 20:35:44 +01:00
Kelebek1
37845e1228 Update 3D regs 2022-10-07 14:13:45 +01:00
Fernando Sahmkow
42ef10060a VideoCore: Refactor fencing system. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
43d8a8fb77 NVDRV: Further refactors and eliminate old code. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
383f95a063 NVDRV: Refactor Host1x 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
a6425c97e4 VideoCore: Refactor syncing. 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
8847b6645c VideoCore: implement channels on gpu caches. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
4165ead1f1 NvHost: Remake Ctrl Implementation. 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
bunnei
f1a91e0397 hle: vi: Integrate new NVFlinger and HosBinderDriverServer service. 2022-03-24 18:13:33 -07:00
Lioncash
4d8010eee3 gpu: Tidy up forward declarations
Over time a few forward declarations became unnecessary, so we can
remove these to tidy up the header a little bit.
2022-01-25 13:05:39 -05:00
Lioncash
4c5c860587 gpu: Remove obsoleted CDMAPusher() accessors
These were obsoleted in 10cc89bfdf but
were accidentally overlooked.
2022-01-25 12:53:56 -05:00
ameerj
664fcdc64b gpu: Add shut down method to synchronize threads before destruction 2022-01-03 20:47:26 -05:00
ameerj
8badb6f4a7 Revert "Merge pull request #7668 from ameerj/fence-stop-token"
This reverts commit 5a612e9217, reversing
changes made to 2e61bc3d51.
2022-01-03 20:28:54 -05:00
ameerj
0585c60227 gpu: Use std::stop_token in WaitFence for VSync thread
Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
2022-01-03 12:31:33 -05:00
Feng Chen
10cc89bfdf Support multiple videos playing 2021-12-02 12:48:42 +08:00
Morph
c7bdf8825f video_core: Add S8_UINT stencil format 2021-11-17 15:04:38 -05:00
ameerj
ae3422e3b7 nvhost_ctrl: Refactor usage of gpu.LockSync()
This seems to only be used to protect a later gpu function call. So we can move the lock into that call instead.
2021-10-03 00:35:57 -04:00
ameerj
20a88d9d62 gpu: Migrate implementation to the cpp file 2021-10-03 00:35:57 -04:00
ameerj
2cb4bb689b gpu: Use std::jthread for async gpu thread 2021-09-15 20:49:07 -04:00
bunnei
9aa144323b video_core: gpu: WaitFence: Do not block threads during shutdown.
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur.
- Commonly observed when stopping emulation in Super Mario Odyssey.
2021-05-29 01:06:04 -07:00
ameerj
453e90ef6f perf_stats: Rework FPS counter to be more accurate
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case.

This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics.
The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values.

The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-15 20:34:20 -04:00
ameerj
de494b30d4 nvhost_vic: Fix device closure
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation.

Also cleans up some of the surrounding code.
2021-04-24 19:22:09 -04:00
bunnei
513b946494 Merge pull request #6125 from ogniK5377/nvdec-close-dev
nvdrv: Cleanup CDMA Processor on device closure
2021-04-16 23:14:44 -07:00
Markus Wick
37ae463f9e video_core/gpu_thread: Implement a ShutDown method.
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone.

This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-04-07 22:38:52 +02:00
Chloe Marcec
d835e6b8e8 nvdrv: Cleanup CDMA Processor on device closure
Brings us a step closer to unifying all channels to share a common interface.
2021-03-30 20:37:40 +11: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
ReinUsesLisp
92ca4929f5 common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2021-01-15 16:27:28 -03:00
bunnei
1481056e3d video_core: gpu: Implement synchronous mode using threaded GPU. 2020-12-28 16:33:48 -08:00
bunnei
927976c86c video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.
- We must always use a GPU thread now, even with synchronous GPU.
2020-12-28 16:33:48 -08: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
Lioncash
47bc37f5cf gpu: Make use of [[nodiscard]] where applicable 2020-11-17 07:19:09 -05:00
Lioncash
8fc37d6fca General: Fix clang build
Allows building on clang to work again
2020-11-05 10:07:16 -05:00
bunnei
c112a94dfe video_core: gpu: Implement WaitFence and IncrementSyncPoint. 2020-11-01 01:52:37 -07: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
ReinUsesLisp
8efb2c5537 video_core: Remove all Core::System references in renderer
Now that the GPU is initialized when video backends are initialized,
it's no longer needed to query components once the game is running: it
can be done when yuzu is booting.

This allows us to pass components between constructors and in the
process remove all Core::System references in the video backend.
2020-09-06 05:28:48 -03: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
Billy Laws
0d1a089177 video_core/gpu: Correct the size of the puller registers
The puller register array is made up of u32s however the `NUM_REGS` value is the size in bytes, so switch it to avoid making the struct unnecessary large. Also fix a small typo in a comment.
2020-07-26 22:26:29 +01:00
bunnei
2e4a5d2110 Merge pull request #4324 from ReinUsesLisp/formats
video_core: Fix, add and rename pixel formats
2020-07-21 00:13:04 -04:00
David Marcec
a4e811af27 async shaders 2020-07-17 14:24:57 +10:00