diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-19 03:25:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 03:25:09 +0100 |
commit | 2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc (patch) | |
tree | 6e49476a6c0c1a333090a01afa7a4fbfd11b8888 /src/core/hle/service/nvflinger/buffer_queue.h | |
parent | Merge pull request #249 from Subv/macro_E1A (diff) | |
parent | vi: Remove DequeueBuffer and wait until next available buffer. (diff) | |
download | yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.tar yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.tar.gz yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.tar.bz2 yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.tar.lz yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.tar.xz yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.tar.zst yuzu-2dc3a56e9602e0bfba9bfc19f31f0433d1564ccc.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue.h')
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h index ef9732769..686eadca7 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.h +++ b/src/core/hle/service/nvflinger/buffer_queue.h @@ -69,12 +69,13 @@ public: }; void SetPreallocatedBuffer(u32 slot, IGBPBuffer& buffer); - u32 DequeueBuffer(u32 pixel_format, u32 width, u32 height); + boost::optional<u32> DequeueBuffer(u32 width, u32 height); const IGBPBuffer& RequestBuffer(u32 slot) const; void QueueBuffer(u32 slot, BufferTransformFlags transform); boost::optional<const Buffer&> AcquireBuffer(); void ReleaseBuffer(u32 slot); u32 Query(QueryType type); + void SetBufferWaitEvent(Kernel::SharedPtr<Kernel::Event>&& wait_event); u32 GetId() const { return id; @@ -90,6 +91,9 @@ private: std::vector<Buffer> queue; Kernel::SharedPtr<Kernel::Event> native_handle; + + /// Used to signal waiting thread when no buffers are available + Kernel::SharedPtr<Kernel::Event> buffer_wait_event; }; } // namespace NVFlinger |