diff --git a/Source/Core/VideoBackends/OGL/TextureConverter.cpp b/Source/Core/VideoBackends/OGL/TextureConverter.cpp index 88c46efc33..0b89ec2fdd 100644 --- a/Source/Core/VideoBackends/OGL/TextureConverter.cpp +++ b/Source/Core/VideoBackends/OGL/TextureConverter.cpp @@ -34,19 +34,22 @@ namespace TextureConverter { using OGL::TextureCache; -std::unique_ptr s_encoding_render_texture; -std::unique_ptr s_encoding_readback_texture; - -const int renderBufferWidth = EFB_WIDTH * 4; -const int renderBufferHeight = 1024; - +namespace +{ struct EncodingProgram { SHADER program; GLint copy_position_uniform; GLint y_scale_uniform; }; -static std::map s_encoding_programs; + +std::map s_encoding_programs; +std::unique_ptr s_encoding_render_texture; +std::unique_ptr s_encoding_readback_texture; + +const int renderBufferWidth = EFB_WIDTH * 4; +const int renderBufferHeight = 1024; +} static EncodingProgram& GetOrCreateEncodingShader(const EFBCopyParams& params) {