From 795893a9a5e45c0e2b6a620e324ae2f2a8458519 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 20 Feb 2020 21:07:17 -0500 Subject: renderer_opengl: Create gl_framebuffer_data if empty. --- src/video_core/renderer_opengl/renderer_opengl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index ee69caa3a..fa226c8ca 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -379,7 +379,8 @@ void RendererOpenGL::PrepareRendertarget(const Tegra::FramebufferConfig* framebu // If framebuffer is provided, reload it from memory to a texture if (screen_info.texture.width != static_cast(framebuffer->width) || screen_info.texture.height != static_cast(framebuffer->height) || - screen_info.texture.pixel_format != framebuffer->pixel_format) { + screen_info.texture.pixel_format != framebuffer->pixel_format || + gl_framebuffer_data.empty()) { // Reallocate texture if the framebuffer size has changed. // This is expected to not happen very often and hence should not be a // performance problem. -- cgit v1.2.3