aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader_cache.h
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-29 00:45:20 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-29 00:45:20 -0400
commitd56a30137df183de548ac49151ddeeecc1ab0f16 (patch)
treebf9179b177db21486138c333e4e500bebe391167 /src/video_core/shader_cache.h
parent322a5afce3d6c5fbcf16ed9a8914805087b33a55 (diff)
nx2: memo for compute macros; one lock per inline upload; cheaper shader invalidation
- Compute engine macros replay repeated calls like 3D ones (title 1's compute macro path fell from ~27% to ~14% of the GPU thread). - AccelerateInlineToMemory takes the buffer and texture cache mutexes together instead of one after the other. - ShaderCache::InvalidatePagesInRegion looks at the rejected programs only when the write can reach one (bounds kept as they are added); it ran a locked scan for every inline upload and pre-draw invalidation. Inline uploads went from ~10% to ~4% of the GPU thread.
Diffstat (limited to 'src/video_core/shader_cache.h')
-rw-r--r--src/video_core/shader_cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/shader_cache.h b/src/video_core/shader_cache.h
index 9ffb7bb44d..f4179dd435 100644
--- a/src/video_core/shader_cache.h
+++ b/src/video_core/shader_cache.h
@@ -7,6 +7,7 @@
#pragma once
#include <array>
+#include <atomic>
#include <exception>
#include <memory>
#include <mutex>
@@ -165,6 +166,9 @@ private:
/// first error instead of lowering again; dropped when guest memory there is written.
std::mutex rejected_mutex;
::Common::unordered_map<u64, std::exception_ptr> rejected_native;
+ /// Bounds of every address ever rejected (never shrinks): a quick test for invalidations.
+ std::atomic<VAddr> rejected_lowest{~VAddr{}};
+ std::atomic<VAddr> rejected_highest{};
};
} // namespace VideoCommon