GS/OpenGL: Set features in Create() instead of constructor

This commit is contained in:
Connor McLaughlin 2021-12-30 15:34:55 +10:00 committed by refractionpcsx2
parent b16c75324e
commit bd43400ad8
1 changed files with 6 additions and 5 deletions

View File

@ -81,11 +81,6 @@ GSDeviceOGL::GSDeviceOGL()
m_debug_gl_call = theApp.GetConfigB("debug_opengl");
m_disable_hw_gl_draw = theApp.GetConfigB("disable_hw_gl_draw");
m_features.broken_point_sampler = GLLoader::vendor_id_amd;
m_features.geometry_shader = GLLoader::found_geometry_shader;
m_features.image_load_store = GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture;
m_features.texture_barrier = true;
}
GSDeviceOGL::~GSDeviceOGL()
@ -254,6 +249,12 @@ bool GSDeviceOGL::Create(const WindowInfo& wi)
Console.WriteLn("Not using shader cache.");
}
// optional features based on context
m_features.broken_point_sampler = GLLoader::vendor_id_amd;
m_features.geometry_shader = GLLoader::found_geometry_shader;
m_features.image_load_store = GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture;
m_features.texture_barrier = true;
{
auto shader = Host::ReadResourceFileToString("shaders/opengl/common_header.glsl");
if (!shader.has_value())