summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-21 23:15:27 +0100
committerGitHub <noreply@github.com>2018-11-21 23:15:27 +0100
commitec38b4e883e223f1614e909ed58661260822e0e2 (patch)
treeedd802619d862310304f011bc20e54c0599573cb /src/video_core
parentMerge pull request #1752 from ReinUsesLisp/unimpl-decompiler (diff)
parentUse default values for unknown framebuffer pixel format (diff)
downloadyuzu-ec38b4e883e223f1614e909ed58661260822e0e2.tar
yuzu-ec38b4e883e223f1614e909ed58661260822e0e2.tar.gz
yuzu-ec38b4e883e223f1614e909ed58661260822e0e2.tar.bz2
yuzu-ec38b4e883e223f1614e909ed58661260822e0e2.tar.lz
yuzu-ec38b4e883e223f1614e909ed58661260822e0e2.tar.xz
yuzu-ec38b4e883e223f1614e909ed58661260822e0e2.tar.zst
yuzu-ec38b4e883e223f1614e909ed58661260822e0e2.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp2
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 83c7e5b0b..51b3904f6 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -17,6 +17,8 @@ u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
switch (format) {
case PixelFormat::ABGR8:
return 4;
+ default:
+ return 4;
}
UNREACHABLE();
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index ea38da932..27b5b8960 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -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();
}