VERY experimental Nintendo Switch 2 emulator
C++
Implement BGRA8 framebuffer format
greggameplayerb4603fafcb1c
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cppindex d3d32a359a..07d4ad9f70 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.hindex fb89758114..19b62dc7ed 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.cppindex 2f6612a352..044ba116ad 100644--- a/src/video_core/surface.cpp+++ b/src/video_core/surface.cpp@@ -426,6 +426,8 @@ PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormatswitch (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();