diff options
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/gpu.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/gpu.h | 12 |
2 files changed, 1 insertions, 20 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 520675873..ab7c21a49 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -262,6 +262,7 @@ struct GPU::Impl { | |||
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void RegisterSyncptInterrupt(u32 syncpoint_id, u32 value) { | 264 | void RegisterSyncptInterrupt(u32 syncpoint_id, u32 value) { |
| 265 | std::lock_guard lock{sync_mutex}; | ||
| 265 | auto& interrupt = syncpt_interrupts.at(syncpoint_id); | 266 | auto& interrupt = syncpt_interrupts.at(syncpoint_id); |
| 266 | bool contains = std::any_of(interrupt.begin(), interrupt.end(), | 267 | bool contains = std::any_of(interrupt.begin(), interrupt.end(), |
| 267 | [value](u32 in_value) { return in_value == value; }); | 268 | [value](u32 in_value) { return in_value == value; }); |
| @@ -300,10 +301,6 @@ struct GPU::Impl { | |||
| 300 | return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den; | 301 | return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den; |
| 301 | } | 302 | } |
| 302 | 303 | ||
| 303 | [[nodiscard]] std::unique_lock<std::mutex> LockSync() { | ||
| 304 | return std::unique_lock{sync_mutex}; | ||
| 305 | } | ||
| 306 | |||
| 307 | [[nodiscard]] bool IsAsync() const { | 304 | [[nodiscard]] bool IsAsync() const { |
| 308 | return is_async; | 305 | return is_async; |
| 309 | } | 306 | } |
| @@ -862,10 +859,6 @@ u64 GPU::GetTicks() const { | |||
| 862 | return impl->GetTicks(); | 859 | return impl->GetTicks(); |
| 863 | } | 860 | } |
| 864 | 861 | ||
| 865 | std::unique_lock<std::mutex> GPU::LockSync() { | ||
| 866 | return impl->LockSync(); | ||
| 867 | } | ||
| 868 | |||
| 869 | bool GPU::IsAsync() const { | 862 | bool GPU::IsAsync() const { |
| 870 | return impl->IsAsync(); | 863 | return impl->IsAsync(); |
| 871 | } | 864 | } |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 39b304823..05e5c94f3 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -5,22 +5,12 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <mutex> | ||
| 9 | 8 | ||
| 10 | #include "common/bit_field.h" | 9 | #include "common/bit_field.h" |
| 11 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 12 | #include "video_core/cdma_pusher.h" | 11 | #include "video_core/cdma_pusher.h" |
| 13 | #include "video_core/framebuffer_config.h" | 12 | #include "video_core/framebuffer_config.h" |
| 14 | 13 | ||
| 15 | using CacheAddr = std::uintptr_t; | ||
| 16 | [[nodiscard]] inline CacheAddr ToCacheAddr(const void* host_ptr) { | ||
| 17 | return reinterpret_cast<CacheAddr>(host_ptr); | ||
| 18 | } | ||
| 19 | |||
| 20 | [[nodiscard]] inline u8* FromCacheAddr(CacheAddr cache_addr) { | ||
| 21 | return reinterpret_cast<u8*>(cache_addr); | ||
| 22 | } | ||
| 23 | |||
| 24 | namespace Core { | 14 | namespace Core { |
| 25 | namespace Frontend { | 15 | namespace Frontend { |
| 26 | class EmuWindow; | 16 | class EmuWindow; |
| @@ -230,8 +220,6 @@ public: | |||
| 230 | 220 | ||
| 231 | [[nodiscard]] u64 GetTicks() const; | 221 | [[nodiscard]] u64 GetTicks() const; |
| 232 | 222 | ||
| 233 | [[nodiscard]] std::unique_lock<std::mutex> LockSync(); | ||
| 234 | |||
| 235 | [[nodiscard]] bool IsAsync() const; | 223 | [[nodiscard]] bool IsAsync() const; |
| 236 | 224 | ||
| 237 | [[nodiscard]] bool UseNvdec() const; | 225 | [[nodiscard]] bool UseNvdec() const; |