From 9ba6a901936bb40e1b724dc3792c1bd2da80ec4c Mon Sep 17 00:00:00 2001 From: GPUCode <47210458+GPUCode@users.noreply.github.com> Date: Sun, 23 Apr 2023 00:35:25 +0300 Subject: [PATCH] gl_format_reinterpreter: Don't release unconditionally (#6459) --- src/video_core/renderer_opengl/gl_format_reinterpreter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp b/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp index 36a1e2451..5019f79b7 100644 --- a/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp +++ b/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp @@ -126,7 +126,9 @@ void ShaderD24S8toRGBA8::Reinterpret(Surface& source, Common::Rectangle src glUniform2i(src_offset_loc, src_rect.left, src_rect.bottom); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - temp_tex.Release(); + if (use_texture_view) { + temp_tex.Release(); + } } } // namespace OpenGL