diff options
author | bunnei <bunneidev@gmail.com> | 2021-08-07 10:17:13 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-09-05 07:25:46 +0200 |
commit | e05bfd2f542ae32aec87c24b9b59684b4ecf5f45 (patch) | |
tree | 07aeb7c684da6cbbc51a71bf8a804d2c6a606e14 /src/core/hle/service/nvflinger/buffer_queue.h | |
parent | Merge pull request #6968 from bunnei/nvflinger-event (diff) | |
download | yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.tar yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.tar.gz yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.tar.bz2 yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.tar.lz yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.tar.xz yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.tar.zst yuzu-e05bfd2f542ae32aec87c24b9b59684b4ecf5f45.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue.h')
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h index 61e337ac5..759247eb0 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.h +++ b/src/core/hle/service/nvflinger/buffer_queue.h @@ -24,6 +24,10 @@ class KReadableEvent; class KWritableEvent; } // namespace Kernel +namespace Service::KernelHelpers { +class ServiceContext; +} // namespace Service::KernelHelpers + namespace Service::NVFlinger { constexpr u32 buffer_slots = 0x40; @@ -54,7 +58,8 @@ public: NativeWindowFormat = 2, }; - explicit BufferQueue(Kernel::KernelCore& kernel, u32 id_, u64 layer_id_); + explicit BufferQueue(Kernel::KernelCore& kernel, u32 id_, u64 layer_id_, + KernelHelpers::ServiceContext& service_context_); ~BufferQueue(); enum class BufferTransformFlags : u32 { @@ -130,12 +135,14 @@ private: std::list<u32> free_buffers; std::array<Buffer, buffer_slots> buffers; std::list<u32> queue_sequence; - Kernel::KEvent buffer_wait_event; + Kernel::KEvent* buffer_wait_event{}; std::mutex free_buffers_mutex; std::condition_variable free_buffers_condition; std::mutex queue_sequence_mutex; + + KernelHelpers::ServiceContext& service_context; }; } // namespace Service::NVFlinger |