Browse Source
Merge pull request #1753 from FernandoS27/ufbtype
Use default values for unknown framebuffer pixel format
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
0 deletions
-
src/video_core/gpu.cpp
-
src/video_core/renderer_opengl/renderer_opengl.cpp
|
|
|
@ -17,6 +17,8 @@ u32 FramebufferConfig::BytesPerPixel(PixelFormat format) { |
|
|
|
switch (format) { |
|
|
|
case PixelFormat::ABGR8: |
|
|
|
return 4; |
|
|
|
default: |
|
|
|
return 4; |
|
|
|
} |
|
|
|
|
|
|
|
UNREACHABLE(); |
|
|
|
|
|
|
|
@ -304,6 +304,12 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture, |
|
|
|
gl_framebuffer_data.resize(texture.width * texture.height * 4); |
|
|
|
break; |
|
|
|
default: |
|
|
|
internal_format = GL_RGBA; |
|
|
|
texture.gl_format = GL_RGBA; |
|
|
|
texture.gl_type = GL_UNSIGNED_INT_8_8_8_8_REV; |
|
|
|
gl_framebuffer_data.resize(texture.width * texture.height * 4); |
|
|
|
LOG_CRITICAL(Render_OpenGL, "Unknown framebuffer pixel format: {}", |
|
|
|
static_cast<u32>(framebuffer.pixel_format)); |
|
|
|
UNREACHABLE(); |
|
|
|
} |
|
|
|
|
|
|
|
|