diff options
| -rw-r--r-- | src/video_core/gpu.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/surface.cpp | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index dea9dfef0..1a7f5bdf2 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -91,6 +91,7 @@ class DebugContext; | |||
| 91 | struct FramebufferConfig { | 91 | struct FramebufferConfig { |
| 92 | enum class PixelFormat : u32 { | 92 | enum class PixelFormat : u32 { |
| 93 | ABGR8 = 1, | 93 | ABGR8 = 1, |
| 94 | RGB565 = 4, | ||
| 94 | BGRA8 = 5, | 95 | BGRA8 = 5, |
| 95 | }; | 96 | }; |
| 96 | 97 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 8c44b330e..af9684839 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -285,7 +285,11 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture, | |||
| 285 | internal_format = GL_RGBA8; | 285 | internal_format = GL_RGBA8; |
| 286 | texture.gl_format = GL_RGBA; | 286 | texture.gl_format = GL_RGBA; |
| 287 | texture.gl_type = GL_UNSIGNED_INT_8_8_8_8_REV; | 287 | texture.gl_type = GL_UNSIGNED_INT_8_8_8_8_REV; |
| 288 | 288 | break; | |
| 289 | case Tegra::FramebufferConfig::PixelFormat::RGB565: | ||
| 290 | internal_format = GL_RGB565; | ||
| 291 | texture.gl_format = GL_RGB; | ||
| 292 | texture.gl_type = GL_UNSIGNED_SHORT_5_6_5; | ||
| 289 | break; | 293 | break; |
| 290 | default: | 294 | default: |
| 291 | internal_format = GL_RGBA8; | 295 | internal_format = GL_RGBA8; |
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index c50f6354d..4ceb219be 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -445,11 +445,12 @@ PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat | |||
| 445 | switch (format) { | 445 | switch (format) { |
| 446 | case Tegra::FramebufferConfig::PixelFormat::ABGR8: | 446 | case Tegra::FramebufferConfig::PixelFormat::ABGR8: |
| 447 | return PixelFormat::ABGR8U; | 447 | return PixelFormat::ABGR8U; |
| 448 | case Tegra::FramebufferConfig::PixelFormat::RGB565: | ||
| 449 | return PixelFormat::B5G6R5U; | ||
| 448 | case Tegra::FramebufferConfig::PixelFormat::BGRA8: | 450 | case Tegra::FramebufferConfig::PixelFormat::BGRA8: |
| 449 | return PixelFormat::BGRA8; | 451 | return PixelFormat::BGRA8; |
| 450 | default: | 452 | default: |
| 451 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 453 | UNIMPLEMENTED_MSG("Unimplemented format={}", static_cast<u32>(format)); |
| 452 | UNREACHABLE(); | ||
| 453 | return PixelFormat::ABGR8U; | 454 | return PixelFormat::ABGR8U; |
| 454 | } | 455 | } |
| 455 | } | 456 | } |