diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 07:47:45 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 07:47:45 -0400 |
| commit | 598bb7750c71ea1378724ddfe9418f27330fa279 (patch) | |
| tree | 3974efea97cc0728dbd49a6526d9933436d788c7 /src/video_core/gpu.h | |
| parent | 6b319471ce12853c95f16140ef01f92b2c7b7b16 (diff) | |
nx2: unmap GPU memory in submission order
NormalUnmapGpuMemory4K and destroying GPU memory are jobs the console's
graphics server completes behind the work already submitted. Run the GMMU
unmaps on the GPU thread after the command lists queued before them
(GPU::RunInOrder) and signal the job's event only then, instead of unmapping
and signalling at once while Eden's GPU thread may still be behind.
Also EDEN_NX2_FRAMES_AHEAD (experimental): wait for the previous frame's
fence at present instead of this one's.
Diffstat (limited to 'src/video_core/gpu.h')
| -rw-r--r-- | src/video_core/gpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 974d214e10..41ba186cd3 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -6,6 +6,7 @@ #pragma once +#include <functional> #include <memory> #include "common/bit_field.h" @@ -247,6 +248,9 @@ public: /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory void FlushRegion(DAddr addr, u64 size); + /// Runs func on the GPU thread after the command lists submitted so far. + void RunInOrder(std::function<void()>&& func); + /// Notify rasterizer that any caches of the specified region should be invalidated void InvalidateRegion(DAddr addr, u64 size, bool preserve_gpu_writes = false); |
