diff options
author | bunnei <bunneidev@gmail.com> | 2019-02-13 03:44:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 03:44:20 +0100 |
commit | cd542d5aacc3ac8eec5ca5be182a76da56c19d05 (patch) | |
tree | 3e9b7ff5fe6f56e7ae492f776a6c5a9e3785c7ab | |
parent | Merge pull request #2114 from lioncash/global (diff) | |
parent | Implement BGRA8 framebuffer format (diff) | |
download | yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.tar yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.tar.gz yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.tar.bz2 yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.tar.lz yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.tar.xz yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.tar.zst yuzu-cd542d5aacc3ac8eec5ca5be182a76da56c19d05.zip |
-rw-r--r-- | src/video_core/gpu.cpp | 1 | ||||
-rw-r--r-- | src/video_core/gpu.h | 1 | ||||
-rw-r--r-- | src/video_core/surface.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 018363f95..3d00c308b 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -18,6 +18,7 @@ namespace Tegra { u32 FramebufferConfig::BytesPerPixel(PixelFormat format) { switch (format) { case PixelFormat::ABGR8: + case PixelFormat::BGRA8: return 4; default: return 4; diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 21d82e426..a482196ea 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -80,6 +80,7 @@ class DebugContext; struct FramebufferConfig { enum class PixelFormat : u32 { ABGR8 = 1, + BGRA8 = 5, }; /** 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 switch (format) { case Tegra::FramebufferConfig::PixelFormat::ABGR8: return PixelFormat::ABGR8U; + case Tegra::FramebufferConfig::PixelFormat::BGRA8: + return PixelFormat::BGRA8; default: LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); UNREACHABLE(); |