diff options
author | bunnei <bunneidev@gmail.com> | 2020-05-16 02:00:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 02:00:50 -0400 |
commit | 3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae (patch) | |
tree | 527569681796c22148cfb32499781b4ba7ff153f /src | |
parent | 74d5c0ed2fe0b545cba59b97a235c1a06f02186f (diff) | |
parent | 6f0360690b48c70c363b789b4e5521f59459521a (diff) |
Merge pull request #3945 from ogniK5377/nvflinger-pixformat
nv_flinger: Use enum for pixel format instead of u32
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.h | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue.cpp b/src/core/hle/service/nvflinger/buffer_queue.cpp index f1e3d832a..caca80dde 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue.cpp @@ -138,9 +138,7 @@ u32 BufferQueue::Query(QueryType type) { switch (type) { case QueryType::NativeWindowFormat: - // TODO(Subv): Use an enum for this - static constexpr u32 FormatABGR8 = 1; - return FormatABGR8; + return static_cast<u32>(PixelFormat::RGBA8888); } UNIMPLEMENTED(); diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h index d5f31e567..8a837e5aa 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.h +++ b/src/core/hle/service/nvflinger/buffer_queue.h @@ -66,6 +66,16 @@ public: Rotate270 = 0x07, }; + enum class PixelFormat : u32 { + RGBA8888 = 1, + RGBX8888 = 2, + RGB888 = 3, + RGB565 = 4, + BGRA8888 = 5, + RGBA5551 = 6, + RRGBA4444 = 7, + }; + struct Buffer { enum class Status { Free = 0, Queued = 1, Dequeued = 2, Acquired = 3 }; |