summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2020-05-16 02:00:50 -0400
committerGravatar GitHub2020-05-16 02:00:50 -0400
commit3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae (patch)
tree527569681796c22148cfb32499781b4ba7ff153f /src
parentMerge pull request #3944 from ogniK5377/dma_mget (diff)
parentnv_flinger: Use enum for pixel format instead of u32 (diff)
downloadyuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.gz
yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.tar.xz
yuzu-3c378a31b5ed9b6e8c8b5dd1861a81c8e55e75ae.zip
Merge pull request #3945 from ogniK5377/nvflinger-pixformat
nv_flinger: Use enum for pixel format instead of u32
Diffstat (limited to '')
-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) {
138 138
139 switch (type) { 139 switch (type) {
140 case QueryType::NativeWindowFormat: 140 case QueryType::NativeWindowFormat:
141 // TODO(Subv): Use an enum for this 141 return static_cast<u32>(PixelFormat::RGBA8888);
142 static constexpr u32 FormatABGR8 = 1;
143 return FormatABGR8;
144 } 142 }
145 143
146 UNIMPLEMENTED(); 144 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:
66 Rotate270 = 0x07, 66 Rotate270 = 0x07,
67 }; 67 };
68 68
69 enum class PixelFormat : u32 {
70 RGBA8888 = 1,
71 RGBX8888 = 2,
72 RGB888 = 3,
73 RGB565 = 4,
74 BGRA8888 = 5,
75 RGBA5551 = 6,
76 RRGBA4444 = 7,
77 };
78
69 struct Buffer { 79 struct Buffer {
70 enum class Status { Free = 0, Queued = 1, Dequeued = 2, Acquired = 3 }; 80 enum class Status { Free = 0, Queued = 1, Dequeued = 2, Acquired = 3 };
71 81