From d04071d6b30dd1babdd8eacee0664188fd29e701 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Wed, 27 May 2020 22:14:27 -0500 Subject: [PATCH 1/6] video_core/GLES: fix issues cause by missing glTextureBarrier create a duplicate for sampling instead --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 ++++++++++++++ .../renderer_opengl/gl_rasterizer_cache.cpp | 2 +- .../renderer_opengl/gl_rasterizer_cache.h | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 0b826fd90..aff65e42d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -776,6 +776,20 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { } } + OGLTexture temp_tex; + if (need_texture_barrier && GLES) { + temp_tex.Create(); + AllocateSurfaceTexture(temp_tex.handle, GetFormatTuple(color_surface->pixel_format), + color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); + glCopyImageSubData(color_surface->texture.handle, GL_TEXTURE_2D, 0, 0, 0, 0, + temp_tex.handle, GL_TEXTURE_2D, 0, 0, 0, 0, color_surface->GetScaledWidth(), + color_surface->GetScaledHeight(), 1); + for (auto& unit : state.texture_units) { + if (unit.texture_2d == color_surface->texture.handle) + unit.texture_2d = temp_tex.handle; + } + } + // Sync and bind the shader if (shader_dirty) { SetShader(); diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 88310a0ac..480bc1d53 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -311,7 +311,7 @@ static constexpr std::array gl }; // Allocate an uninitialized texture of appropriate size and format for the surface -static void AllocateSurfaceTexture(GLuint texture, const FormatTuple& format_tuple, u32 width, +void AllocateSurfaceTexture(GLuint texture, const FormatTuple& format_tuple, u32 width, u32 height) { OpenGLState cur_state = OpenGLState::GetCurState(); diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 1a9b6a3b3..ca2159a4d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -339,4 +339,7 @@ struct FormatTuple { constexpr FormatTuple tex_tuple = {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE}; const FormatTuple& GetFormatTuple(SurfaceParams::PixelFormat pixel_format); + +void AllocateSurfaceTexture(GLuint texture, const FormatTuple& format_tuple, u32 width, + u32 height); } // namespace OpenGL From b80c6f753409cf3d8e1c2c1c3d1e9b861dc14bb4 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Sat, 20 Jun 2020 12:52:58 -0500 Subject: [PATCH 2/6] handle all cases more robustly --- .../renderer_opengl/gl_rasterizer.cpp | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index aff65e42d..43b8ecc3c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -777,16 +777,27 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { } OGLTexture temp_tex; - if (need_texture_barrier && GLES) { + if (need_texture_barrier) { temp_tex.Create(); AllocateSurfaceTexture(temp_tex.handle, GetFormatTuple(color_surface->pixel_format), color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); - glCopyImageSubData(color_surface->texture.handle, GL_TEXTURE_2D, 0, 0, 0, 0, - temp_tex.handle, GL_TEXTURE_2D, 0, 0, 0, 0, color_surface->GetScaledWidth(), - color_surface->GetScaledHeight(), 1); + for (std::size_t mip{0}; mip <= color_surface->max_level; ++mip) { + glCopyImageSubData(color_surface->texture.handle, GL_TEXTURE_2D, mip, 0, 0, 0, + temp_tex.handle, GL_TEXTURE_2D, mip, 0, 0, 0, + color_surface->GetScaledWidth() >> mip, + color_surface->GetScaledHeight() >> mip, 1); + } for (auto& unit : state.texture_units) { - if (unit.texture_2d == color_surface->texture.handle) + if (unit.texture_2d == color_surface->texture.handle) { unit.texture_2d = temp_tex.handle; + } + } + for (auto shadow_unit : {&state.image_shadow_texture_nx, &state.image_shadow_texture_ny, + &state.image_shadow_texture_nz, &state.image_shadow_texture_px, + &state.image_shadow_texture_py, &state.image_shadow_texture_pz}) { + if (*shadow_unit == color_surface->texture.handle) { + *shadow_unit = temp_tex.handle; + } } } @@ -864,10 +875,6 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { GL_TEXTURE_UPDATE_BARRIER_BIT | GL_FRAMEBUFFER_BARRIER_BIT); } - if (need_texture_barrier && GLAD_GL_ARB_texture_barrier) { - glTextureBarrier(); - } - // Mark framebuffer surfaces as dirty Common::Rectangle draw_rect_unscaled{draw_rect.left / res_scale, draw_rect.top / res_scale, draw_rect.right / res_scale, From cae4b7aaf7b04f8ccc271f55d7581d03d8589a0b Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Fri, 26 Jun 2020 15:41:10 -0500 Subject: [PATCH 3/6] Clean up --- .../renderer_opengl/gl_rasterizer.cpp | 29 ++++++++++++------- .../renderer_opengl/gl_rasterizer_cache.cpp | 2 +- .../renderer_opengl/gl_rasterizer_cache.h | 3 -- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 43b8ecc3c..8398b884f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -61,11 +61,6 @@ RasterizerOpenGL::RasterizerOpenGL() "Shadow might not be able to render because of unsupported OpenGL extensions."); } - if (!GLAD_GL_ARB_texture_barrier) { - LOG_WARNING(Render_OpenGL, - "ARB_texture_barrier not supported. Some games might produce artifacts."); - } - // Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0 state.clip_distance[0] = true; @@ -643,10 +638,10 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { uniform_block_data.dirty = true; } - bool need_texture_barrier = false; - auto CheckBarrier = [&need_texture_barrier, &color_surface](GLuint handle) { + bool need_duplicate_texture = false; + auto CheckBarrier = [&need_duplicate_texture, &color_surface](GLuint handle) { if (color_surface && color_surface->texture.handle == handle) { - need_texture_barrier = true; + need_duplicate_texture = true; } }; @@ -777,16 +772,28 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { } OGLTexture temp_tex; - if (need_texture_barrier) { + if (need_duplicate_texture) { + // The game is trying to use a surface as a texture and framebuffer at the same time + // which causes unpredictable behavior on the host. + // Making a copy to sample from eliminates this issue and seems to be fairly cheap. temp_tex.Create(); - AllocateSurfaceTexture(temp_tex.handle, GetFormatTuple(color_surface->pixel_format), - color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, temp_tex.handle); + auto [internal_format, format, type] = GetFormatTuple(color_surface->pixel_format); + ASSERT_MSG(GLAD_GL_ARB_texture_storage, "ARB_texture_storage not supported"); + glTexStorage2D(GL_TEXTURE_2D, color_surface->max_level + 1, internal_format, + color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glBindTexture(GL_TEXTURE_2D, state.texture_units[0].texture_2d); + for (std::size_t mip{0}; mip <= color_surface->max_level; ++mip) { glCopyImageSubData(color_surface->texture.handle, GL_TEXTURE_2D, mip, 0, 0, 0, temp_tex.handle, GL_TEXTURE_2D, mip, 0, 0, 0, color_surface->GetScaledWidth() >> mip, color_surface->GetScaledHeight() >> mip, 1); } + for (auto& unit : state.texture_units) { if (unit.texture_2d == color_surface->texture.handle) { unit.texture_2d = temp_tex.handle; diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 480bc1d53..88310a0ac 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -311,7 +311,7 @@ static constexpr std::array gl }; // Allocate an uninitialized texture of appropriate size and format for the surface -void AllocateSurfaceTexture(GLuint texture, const FormatTuple& format_tuple, u32 width, +static void AllocateSurfaceTexture(GLuint texture, const FormatTuple& format_tuple, u32 width, u32 height) { OpenGLState cur_state = OpenGLState::GetCurState(); diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index ca2159a4d..1a9b6a3b3 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -339,7 +339,4 @@ struct FormatTuple { constexpr FormatTuple tex_tuple = {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE}; const FormatTuple& GetFormatTuple(SurfaceParams::PixelFormat pixel_format); - -void AllocateSurfaceTexture(GLuint texture, const FormatTuple& format_tuple, u32 width, - u32 height); } // namespace OpenGL From ea2584c54de0bbf28c7c549e5cfe8cb0c76e85cf Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Sat, 27 Jun 2020 13:13:37 -0500 Subject: [PATCH 4/6] generic texture allocator --- .../renderer_opengl/gl_rasterizer.cpp | 19 +++---- .../renderer_opengl/gl_resource_manager.cpp | 57 +++++++++++++++++++ .../renderer_opengl/gl_resource_manager.h | 2 + 3 files changed, 68 insertions(+), 10 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 8398b884f..941166326 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -777,21 +777,20 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { // which causes unpredictable behavior on the host. // Making a copy to sample from eliminates this issue and seems to be fairly cheap. temp_tex.Create(); - glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, temp_tex.handle); auto [internal_format, format, type] = GetFormatTuple(color_surface->pixel_format); - ASSERT_MSG(GLAD_GL_ARB_texture_storage, "ARB_texture_storage not supported"); - glTexStorage2D(GL_TEXTURE_2D, color_surface->max_level + 1, internal_format, - color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + OGLTexture::Allocate(GL_TEXTURE_2D, color_surface->max_level, internal_format, format, type, + color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_2D, state.texture_units[0].texture_2d); - for (std::size_t mip{0}; mip <= color_surface->max_level; ++mip) { - glCopyImageSubData(color_surface->texture.handle, GL_TEXTURE_2D, mip, 0, 0, 0, - temp_tex.handle, GL_TEXTURE_2D, mip, 0, 0, 0, - color_surface->GetScaledWidth() >> mip, - color_surface->GetScaledHeight() >> mip, 1); + for (std::size_t level{0}; level <= color_surface->max_level; ++level) { + glCopyImageSubData(color_surface->texture.handle, GL_TEXTURE_2D, level, 0, 0, 0, + temp_tex.handle, GL_TEXTURE_2D, level, 0, 0, 0, + color_surface->GetScaledWidth() >> level, + color_surface->GetScaledHeight() >> level, 1); } for (auto& unit : state.texture_units) { diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index 836cbb90c..19bc83aa3 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -9,6 +9,7 @@ #include "video_core/renderer_opengl/gl_resource_manager.h" #include "video_core/renderer_opengl/gl_shader_util.h" #include "video_core/renderer_opengl/gl_state.h" +#include "video_core/renderer_opengl/gl_vars.h" MICROPROFILE_DEFINE(OpenGL_ResourceCreation, "OpenGL", "Resource Creation", MP_RGB(128, 128, 192)); MICROPROFILE_DEFINE(OpenGL_ResourceDeletion, "OpenGL", "Resource Deletion", MP_RGB(128, 128, 192)); @@ -51,6 +52,62 @@ void OGLTexture::Release() { handle = 0; } +void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat, + GLenum format, GLenum type, GLsizei width, GLsizei height, + GLsizei depth) { + const bool tex_storage = GLAD_GL_ARB_texture_storage || GLES; + + switch (target) { + case GL_TEXTURE_1D: + case GL_TEXTURE: + if (tex_storage) { + glTexStorage1D(target, levels, internalformat, width); + } else { + for (GLsizei level{0}; level < levels; ++level) { + width >>= 1; + glTexImage1D(target, level, internalformat, width, 0, format, type, nullptr); + } + } + break; + case GL_TEXTURE_2D: + case GL_TEXTURE_1D_ARRAY: + case GL_TEXTURE_RECTANGLE: + case GL_TEXTURE_CUBE_MAP: + if (tex_storage) { + glTexStorage2D(target, levels, internalformat, width, height); + } else { + for (GLsizei level{0}; level < levels; ++level) { + width >>= 1; + if (target != GL_TEXTURE_1D_ARRAY) + height >>= 1; + glTexImage2D(target, level, internalformat, width, height, 0, format, type, + nullptr); + } + } + break; + case GL_TEXTURE_3D: + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: + if (tex_storage) { + glTexStorage3D(target, levels, internalformat, width, height, depth); + } else { + for (GLsizei level{0}; level < levels; ++level) { + glTexImage3D(target, level, internalformat, width, height, depth, 0, format, type, + nullptr); + } + width >>= 1; + height >>= 1; + if (target == GL_TEXTURE_3D) + depth >>= 1; + } + break; + } + + if (!tex_storage) { + glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, levels - 1); + } +} + void OGLSampler::Create() { if (handle != 0) return; diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h index 9b9f150e1..db326ed9a 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.h +++ b/src/video_core/renderer_opengl/gl_resource_manager.h @@ -59,6 +59,8 @@ public: /// Deletes the internal OpenGL resource void Release(); + static void Allocate(GLenum target, GLsizei levels, GLenum internalformat, GLenum format, GLenum type, GLsizei width, GLsizei height = 1, GLsizei depth = 1); + GLuint handle = 0; }; From 662c348b6cefc7dbdf086ccdde51a514abaa5229 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Sat, 27 Jun 2020 13:23:34 -0500 Subject: [PATCH 5/6] fix --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 2 +- src/video_core/renderer_opengl/gl_resource_manager.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 941166326..cf3290109 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -779,7 +779,7 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { temp_tex.Create(); glBindTexture(GL_TEXTURE_2D, temp_tex.handle); auto [internal_format, format, type] = GetFormatTuple(color_surface->pixel_format); - OGLTexture::Allocate(GL_TEXTURE_2D, color_surface->max_level, internal_format, format, type, + OGLTexture::Allocate(GL_TEXTURE_2D, color_surface->max_level + 1, internal_format, format, type, color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index 19bc83aa3..846edd066 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -64,8 +64,8 @@ void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat, glTexStorage1D(target, levels, internalformat, width); } else { for (GLsizei level{0}; level < levels; ++level) { - width >>= 1; glTexImage1D(target, level, internalformat, width, 0, format, type, nullptr); + width >>= 1; } } break; @@ -77,11 +77,11 @@ void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat, glTexStorage2D(target, levels, internalformat, width, height); } else { for (GLsizei level{0}; level < levels; ++level) { + glTexImage2D(target, level, internalformat, width, height, 0, format, type, + nullptr); width >>= 1; if (target != GL_TEXTURE_1D_ARRAY) height >>= 1; - glTexImage2D(target, level, internalformat, width, height, 0, format, type, - nullptr); } } break; From 60282f35fe1e8f55958753ccceca02f853a69339 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Tue, 7 Jul 2020 16:43:42 -0500 Subject: [PATCH 6/6] fix clang format --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 +++-- src/video_core/renderer_opengl/gl_resource_manager.cpp | 5 ++--- src/video_core/renderer_opengl/gl_resource_manager.h | 3 ++- src/video_core/renderer_opengl/renderer_opengl.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index cf3290109..93332b7a2 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -779,8 +779,9 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { temp_tex.Create(); glBindTexture(GL_TEXTURE_2D, temp_tex.handle); auto [internal_format, format, type] = GetFormatTuple(color_surface->pixel_format); - OGLTexture::Allocate(GL_TEXTURE_2D, color_surface->max_level + 1, internal_format, format, type, - color_surface->GetScaledWidth(), color_surface->GetScaledHeight()); + OGLTexture::Allocate(GL_TEXTURE_2D, color_surface->max_level + 1, internal_format, format, + type, color_surface->GetScaledWidth(), + color_surface->GetScaledHeight()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index 846edd066..f185b2355 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -52,9 +52,8 @@ void OGLTexture::Release() { handle = 0; } -void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat, - GLenum format, GLenum type, GLsizei width, GLsizei height, - GLsizei depth) { +void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat, GLenum format, + GLenum type, GLsizei width, GLsizei height, GLsizei depth) { const bool tex_storage = GLAD_GL_ARB_texture_storage || GLES; switch (target) { diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h index db326ed9a..595b8c129 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.h +++ b/src/video_core/renderer_opengl/gl_resource_manager.h @@ -59,7 +59,8 @@ public: /// Deletes the internal OpenGL resource void Release(); - static void Allocate(GLenum target, GLsizei levels, GLenum internalformat, GLenum format, GLenum type, GLsizei width, GLsizei height = 1, GLsizei depth = 1); + static void Allocate(GLenum target, GLsizei levels, GLenum internalformat, GLenum format, + GLenum type, GLsizei width, GLsizei height = 1, GLsizei depth = 1); GLuint handle = 0; }; diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 4b946ef74..754ce43b6 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -384,7 +384,7 @@ void RendererOpenGL::SwapBuffers() { if (frame_dumper.IsDumping()) { try { RenderToMailbox(frame_dumper.GetLayout(), frame_dumper.mailbox, true); - } catch(const OGLTextureMailboxException& exception) { + } catch (const OGLTextureMailboxException& exception) { LOG_DEBUG(Render_OpenGL, "Frame dumper exception caught: {}", exception.what()); } }