diff options
author | Subv <subv2112@gmail.com> | 2018-01-09 02:28:06 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-11 05:28:25 +0100 |
commit | e21fbd9ae5d8139d585019228e1fb1a6229f244c (patch) | |
tree | 931ddca10c9239a94ef1cacb1d86779a0adde8d2 /src/core/hle/service/vi/vi.h | |
parent | NV: Signal all display's vsync event 60 times per second. (diff) | |
download | yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.tar yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.tar.gz yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.tar.bz2 yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.tar.lz yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.tar.xz yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.tar.zst yuzu-e21fbd9ae5d8139d585019228e1fb1a6229f244c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/vi/vi.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h index 1bd8f7472..576c4ce32 100644 --- a/src/core/hle/service/vi/vi.h +++ b/src/core/hle/service/vi/vi.h @@ -5,6 +5,7 @@ #pragma once #include <memory> +#include <boost/optional.hpp> #include "core/hle/kernel/event.h" #include "core/hle/service/service.h" @@ -34,10 +35,20 @@ public: BufferQueue(u32 id, u64 layer_id); ~BufferQueue() = default; + struct Buffer { + enum class Status { Free = 0, Queued = 1, Dequeued = 2, Acquired = 3 }; + + u32 slot; + Status status = Status::Free; + IGBPBuffer igbp_buffer; + }; + void SetPreallocatedBuffer(u32 slot, IGBPBuffer& buffer); u32 DequeueBuffer(u32 pixel_format, u32 width, u32 height); const IGBPBuffer& RequestBuffer(u32 slot) const; void QueueBuffer(u32 slot); + boost::optional<const Buffer&> AcquireBuffer(); + void ReleaseBuffer(u32 slot); u32 GetId() const { return id; @@ -47,14 +58,6 @@ private: u32 id; u64 layer_id; - struct Buffer { - enum class Status { None = 0, Queued = 1, Dequeued = 2 }; - - u32 slot; - Status status = Status::None; - IGBPBuffer igbp_buffer; - }; - std::vector<Buffer> queue; }; |