summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-05-16 05:47:55 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-05-16 05:47:55 +0200
commit6f0360690b48c70c363b789b4e5521f59459521a (patch)
treec15731d966908aee1ff459871acece876f962c1c
parentMerge pull request #3942 from ReinUsesLisp/flush-and-invalidate (diff)
downloadyuzu-6f0360690b48c70c363b789b4e5521f59459521a.tar
yuzu-6f0360690b48c70c363b789b4e5521f59459521a.tar.gz
yuzu-6f0360690b48c70c363b789b4e5521f59459521a.tar.bz2
yuzu-6f0360690b48c70c363b789b4e5521f59459521a.tar.lz
yuzu-6f0360690b48c70c363b789b4e5521f59459521a.tar.xz
yuzu-6f0360690b48c70c363b789b4e5521f59459521a.tar.zst
yuzu-6f0360690b48c70c363b789b4e5521f59459521a.zip
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue.cpp4
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue.h10
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 };