Implement BGRA8 framebuffer format

This commit is contained in:
greggameplayer
2019-01-11 21:15:30 +01:00
parent bc879ae880
commit f6e998f6ad
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ namespace Tegra {
u32 FramebufferConfig::BytesPerPixel(PixelFormat format) { u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
switch (format) { switch (format) {
case PixelFormat::ABGR8: case PixelFormat::ABGR8:
case PixelFormat::BGRA8:
return 4; return 4;
default: default:
return 4; return 4;
+1
View File
@@ -80,6 +80,7 @@ class DebugContext;
struct FramebufferConfig { struct FramebufferConfig {
enum class PixelFormat : u32 { enum class PixelFormat : u32 {
ABGR8 = 1, ABGR8 = 1,
BGRA8 = 5,
}; };
/** /**
+2
View File
@@ -408,6 +408,8 @@ PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat
switch (format) { switch (format) {
case Tegra::FramebufferConfig::PixelFormat::ABGR8: case Tegra::FramebufferConfig::PixelFormat::ABGR8:
return PixelFormat::ABGR8U; return PixelFormat::ABGR8U;
case Tegra::FramebufferConfig::PixelFormat::BGRA8:
return PixelFormat::BGRA8;
default: default:
LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
UNREACHABLE(); UNREACHABLE();