mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-22 09:17:46 +00:00
NV: Determine what buffer to draw for each layer of each display.
Don't try to draw buffers that the guest application is using, only queued buffers are eligible for drawing. Drawing actual pixels is still not implemented.
This commit is contained in:
parent
1b907ea655
commit
91a0d29466
2 changed files with 58 additions and 13 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue