diff options
author | bunnei <bunneidev@gmail.com> | 2020-05-16 08:00:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 08:00:50 +0200 |
commit | 3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae (patch) | |
tree | 527569681796c22148cfb32499781b4ba7ff153f /src | |
parent | Merge pull request #3944 from ogniK5377/dma_mget (diff) | |
parent | nv_flinger: Use enum for pixel format instead of u32 (diff) | |
download | yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.gz yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.bz2 yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.lz yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.xz yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.zst yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.zip |
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 }; |