summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar greggameplayer2019-01-11 21:15:30 +0100
committerGravatar Unknown2019-02-09 23:44:01 +0100
commita6a73d8892684596791aca34a337a07477078284 (patch)
treec1868d2d962b6bfd4f84c19bdd90fc86f617268a
parentMerge pull request #1904 from bunnei/better-fermi-copy (diff)
downloadyuzu-a6a73d8892684596791aca34a337a07477078284.tar.gz
yuzu-a6a73d8892684596791aca34a337a07477078284.tar.xz
yuzu-a6a73d8892684596791aca34a337a07477078284.zip
Implement BGRA8 framebuffer format
Diffstat (limited to '')
-rw-r--r--src/video_core/gpu.cpp1
-rw-r--r--src/video_core/gpu.h1
-rw-r--r--src/video_core/surface.cpp2
3 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index d3d32a359..07d4ad9f7 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -18,6 +18,7 @@ namespace Tegra {
18u32 FramebufferConfig::BytesPerPixel(PixelFormat format) { 18u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
19 switch (format) { 19 switch (format) {
20 case PixelFormat::ABGR8: 20 case PixelFormat::ABGR8:
21 case PixelFormat::BGRA8:
21 return 4; 22 return 4;
22 default: 23 default:
23 return 4; 24 return 4;
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index fb8975811..19b62dc7e 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -80,6 +80,7 @@ class DebugContext;
80struct FramebufferConfig { 80struct FramebufferConfig {
81 enum class PixelFormat : u32 { 81 enum class PixelFormat : u32 {
82 ABGR8 = 1, 82 ABGR8 = 1,
83 BGRA8 = 5,
83 }; 84 };
84 85
85 /** 86 /**
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 2f6612a35..044ba116a 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -426,6 +426,8 @@ PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat
426 switch (format) { 426 switch (format) {
427 case Tegra::FramebufferConfig::PixelFormat::ABGR8: 427 case Tegra::FramebufferConfig::PixelFormat::ABGR8:
428 return PixelFormat::ABGR8U; 428 return PixelFormat::ABGR8U;
429 case Tegra::FramebufferConfig::PixelFormat::BGRA8:
430 return PixelFormat::BGRA8;
429 default: 431 default:
430 LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); 432 LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
431 UNREACHABLE(); 433 UNREACHABLE();