Make shader trap mutex recursive

There are cases there we hit a shader trap within the GPU, by making it recursive we avoid deadlocking on reads within the GPU.
This commit is contained in:
Billy Laws 2022-12-31 23:04:27 +00:00
parent 1a6165f74d
commit 97e127153b

View File

@ -29,8 +29,8 @@ namespace skyline::gpu::interconnect {
};
tsl::robin_map<u8 *, std::unique_ptr<MirrorEntry>> mirrorMap;
std::mutex trapMutex; //!< Protects accesses from trap handlers to the mirror map
std::optional<std::scoped_lock<std::mutex>> trapExecutionLock; //!< Persistently held lock over an execution to avoid frequent relocking
std::recursive_mutex trapMutex; //!< Protects accesses from trap handlers to the mirror map
std::optional<std::scoped_lock<std::recursive_mutex>> trapExecutionLock; //!< Persistently held lock over an execution to avoid frequent relocking
MirrorEntry *entry{};
span<u8> mirrorBlock{}; //!< Guest mapped memory block corresponding to `entry`
u64 lastProgramBase{};