diff options
| author | Sssnowyyy <78863999+Sssnowyyy@users.noreply.github.com> | 2026-11-02 13:18:13 -0500 |
|---|---|---|
| committer | Sssnowyyy <78863999+Sssnowyyy@users.noreply.github.com> | 2026-11-02 14:53:47 -0500 |
| commit | 9f4f01f76e8556941c0c0c3f57edc1d600ed23ea (patch) | |
| tree | 8b0f38578d61852c3c27978baddd0c70daf84d9b /src/video_core/gpu_thread.h | |
| parent | cd9b19c69d7eedc2d2d3557c27a0a06c4420213d (diff) | |
nx2: map GPU memory before later command lists are read
837133792d queues the GMMU maps on the GPU thread (GPU::RunInOrder) so the
service thread never waits for the texture cache. With the GPU split
(Low GPU accuracy) the GPU thread defers queued functions to its back, but
its front reads the command lists: it read the lists submitted after a map
through GPU addresses that weren't mapped yet. Pokopia stopped after its
first frame.
Add GPU::MapInOrder for the GMMU maps and the sparse tile remaps. It runs
in order like RunInOrder, and with the split it runs on the front after
draining the back, before the front reads further command lists. The
service thread still never takes the texture cache lock, and the back is
idle while the map changes the caches. Unmaps and the other queued work
still run on the back.
Assisted-by: Claude Opus 5.5 (bisect, fix, testing and commit message)
Diffstat (limited to 'src/video_core/gpu_thread.h')
| -rw-r--r-- | src/video_core/gpu_thread.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index 796c0d89f6..927453dab0 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h @@ -80,6 +80,9 @@ struct GPUTickCommand final {}; /// Command to run a function on the GPU thread after the commands queued before it struct RunCommand final { std::function<void()> func; + /// With the GPU split, run on its front (after draining the back) instead of deferring to the + /// back, so command lists read after this one see what func did (GMMU maps). + bool before_later_reads{}; }; using CommandData = @@ -132,7 +135,7 @@ public: void TickGPU(bool is_async); /// Runs func on the GPU thread once the commands queued before it have been processed. - void Run(std::function<void()>&& func, bool is_async); + void Run(std::function<void()>&& func, bool is_async, bool before_later_reads = false); void NotifyShutdown(); |
