mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 23:59:25 -05:00
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.
This commit is contained in:
@ -262,6 +262,7 @@ struct GPU::Impl {
|
||||
}
|
||||
|
||||
void RegisterSyncptInterrupt(u32 syncpoint_id, u32 value) {
|
||||
std::lock_guard lock{sync_mutex};
|
||||
auto& interrupt = syncpt_interrupts.at(syncpoint_id);
|
||||
bool contains = std::any_of(interrupt.begin(), interrupt.end(),
|
||||
[value](u32 in_value) { return in_value == value; });
|
||||
@ -300,10 +301,6 @@ struct GPU::Impl {
|
||||
return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::unique_lock<std::mutex> LockSync() {
|
||||
return std::unique_lock{sync_mutex};
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsAsync() const {
|
||||
return is_async;
|
||||
}
|
||||
@ -862,10 +859,6 @@ u64 GPU::GetTicks() const {
|
||||
return impl->GetTicks();
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> GPU::LockSync() {
|
||||
return impl->LockSync();
|
||||
}
|
||||
|
||||
bool GPU::IsAsync() const {
|
||||
return impl->IsAsync();
|
||||
}
|
||||
|
Reference in New Issue
Block a user