GS:OGL: Don't memset C++ objects

This commit is contained in:
TellowKrinkle 2022-02-19 20:26:47 -06:00 committed by refractionpcsx2
parent 099ddfedc7
commit 294855700d
2 changed files with 9 additions and 21 deletions

View File

@ -51,18 +51,6 @@ GSDeviceOGL::GSDeviceOGL()
, m_fbo_read(0) , m_fbo_read(0)
, m_palette_ss(0) , m_palette_ss(0)
{ {
memset(&m_merge_obj, 0, sizeof(m_merge_obj));
memset(&m_interlace, 0, sizeof(m_interlace));
memset(&m_convert, 0, sizeof(m_convert));
memset(&m_fxaa, 0, sizeof(m_fxaa));
#ifndef PCSX2_CORE
memset(&m_shaderfx, 0, sizeof(m_shaderfx));
#endif
memset(&m_date, 0, sizeof(m_date));
memset(&m_shadeboost, 0, sizeof(m_shadeboost));
memset(&m_om_dss, 0, sizeof(m_om_dss));
memset(&m_profiler, 0, sizeof(m_profiler));
// Reset the debug file // Reset the debug file
#ifdef ENABLE_OGL_DEBUG #ifdef ENABLE_OGL_DEBUG
m_debug_gl_file = fopen("GS_opengl_debug.txt", "w"); m_debug_gl_file = fopen("GS_opengl_debug.txt", "w");

View File

@ -249,10 +249,10 @@ private:
{ {
std::string vs; std::string vs;
GL::Program ps[static_cast<int>(ShaderConvert::Count)]; // program object GL::Program ps[static_cast<int>(ShaderConvert::Count)]; // program object
GLuint ln; // sampler object GLuint ln = 0; // sampler object
GLuint pt; // sampler object GLuint pt = 0; // sampler object
GSDepthStencilOGL* dss; GSDepthStencilOGL* dss = nullptr;
GSDepthStencilOGL* dss_write; GSDepthStencilOGL* dss_write = nullptr;
} m_convert; } m_convert;
struct struct
@ -269,8 +269,8 @@ private:
struct struct
{ {
GSDepthStencilOGL* dss; GSDepthStencilOGL* dss = nullptr;
GSTexture* t; GSTexture* t = nullptr;
} m_date; } m_date;
struct struct
@ -280,14 +280,14 @@ private:
struct struct
{ {
u16 last_query; u16 last_query = 0;
GLuint timer_query[1 << 16]; GLuint timer_query[1 << 16] = {};
GLuint timer() { return timer_query[last_query]; } GLuint timer() { return timer_query[last_query]; }
} m_profiler; } m_profiler;
GLuint m_ps_ss[1 << 8]; GLuint m_ps_ss[1 << 8];
GSDepthStencilOGL* m_om_dss[1 << 5]; GSDepthStencilOGL* m_om_dss[1 << 5] = {};
std::unordered_map<ProgramSelector, GL::Program, ProgramSelectorHash> m_programs; std::unordered_map<ProgramSelector, GL::Program, ProgramSelectorHash> m_programs;
GL::ShaderCache m_shader_cache; GL::ShaderCache m_shader_cache;