Compare commits

...

7 Commits

Author SHA1 Message Date
greggameplayer
f604499702 Merge branch 'master' into BGRA8-Framebuffer-Format 2019-02-13 07:13:41 +01:00
greggameplayer
dfb0b7beb3 More correct implementation of RGB565 Framebuffer format 2019-02-09 23:56:15 +01:00
greggameplayer
60157170cb Revert "Implement RGB565 Framebuffer format"
This reverts commit 865387f3c3.

Conflicts:
	src/video_core/gpu.h
	src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
	src/video_core/surface.cpp
2019-02-09 23:50:39 +01:00
greggameplayer
5abf93266e Revert "Implement BGRA8 framebuffer format"
This reverts commit f6e998f6ad.

Conflicts:
	src/video_core/gpu.h
	src/video_core/surface.cpp
2019-02-09 23:47:46 +01:00
greggameplayer
92bd4fc8eb Correct internal format of RGB565U 2019-01-14 19:20:17 +01:00
greggameplayer
865387f3c3 Implement RGB565 Framebuffer format 2019-01-12 16:45:18 +01:00
greggameplayer
f6e998f6ad Implement BGRA8 framebuffer format 2019-01-12 16:24:35 +01:00
3 changed files with 8 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ namespace Tegra {
u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
switch (format) {
case PixelFormat::ABGR8:
case PixelFormat::RGB565:
case PixelFormat::BGRA8:
return 4;
default:

View File

@@ -80,6 +80,7 @@ class DebugContext;
struct FramebufferConfig {
enum class PixelFormat : u32 {
ABGR8 = 1,
RGB565 = 4,
BGRA8 = 5,
};

View File

@@ -266,6 +266,12 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture,
texture.gl_type = GL_UNSIGNED_INT_8_8_8_8_REV;
gl_framebuffer_data.resize(texture.width * texture.height * 4);
break;
case Tegra::FramebufferConfig::PixelFormat::RGB565:
internal_format = GL_RGB;
texture.gl_format = GL_RGB;
texture.gl_type = GL_UNSIGNED_SHORT_5_6_5;
gl_framebuffer_data.resize(texture.width * texture.height * 4);
break;
default:
internal_format = GL_RGBA8;
texture.gl_format = GL_RGBA;