mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
VideoBackends: Verify validity before doing full renderer init
Prevents attempting to create invalid MSAA configurations, for example.
This commit is contained in:
parent
1151a1238f
commit
2a4bca8b4a
@ -135,6 +135,8 @@ bool VideoBackend::InitializeGLExtensions(GLContext* context)
|
|||||||
|
|
||||||
bool VideoBackend::FillBackendInfo()
|
bool VideoBackend::FillBackendInfo()
|
||||||
{
|
{
|
||||||
|
InitBackendInfo();
|
||||||
|
|
||||||
// check for the max vertex attributes
|
// check for the max vertex attributes
|
||||||
GLint numvertexattribs = 0;
|
GLint numvertexattribs = 0;
|
||||||
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &numvertexattribs);
|
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &numvertexattribs);
|
||||||
@ -162,10 +164,8 @@ bool VideoBackend::FillBackendInfo()
|
|||||||
|
|
||||||
bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||||
{
|
{
|
||||||
InitializeShared();
|
|
||||||
|
|
||||||
std::unique_ptr<GLContext> main_gl_context =
|
std::unique_ptr<GLContext> main_gl_context =
|
||||||
GLContext::Create(wsi, g_ActiveConfig.stereo_mode == StereoMode::QuadBuffer, true, false,
|
GLContext::Create(wsi, g_Config.stereo_mode == StereoMode::QuadBuffer, true, false,
|
||||||
Config::Get(Config::GFX_PREFER_GLES));
|
Config::Get(Config::GFX_PREFER_GLES));
|
||||||
if (!main_gl_context)
|
if (!main_gl_context)
|
||||||
return false;
|
return false;
|
||||||
@ -173,6 +173,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
|||||||
if (!InitializeGLExtensions(main_gl_context.get()) || !FillBackendInfo())
|
if (!InitializeGLExtensions(main_gl_context.get()) || !FillBackendInfo())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
InitializeShared();
|
||||||
g_renderer = std::make_unique<Renderer>(std::move(main_gl_context), wsi.render_surface_scale);
|
g_renderer = std::make_unique<Renderer>(std::move(main_gl_context), wsi.render_surface_scale);
|
||||||
ProgramShaderCache::Init();
|
ProgramShaderCache::Init();
|
||||||
g_vertex_manager = std::make_unique<VertexManager>();
|
g_vertex_manager = std::make_unique<VertexManager>();
|
||||||
|
@ -294,6 +294,7 @@ void VideoBackendBase::InitializeShared()
|
|||||||
GeometryShaderManager::Init();
|
GeometryShaderManager::Init();
|
||||||
PixelShaderManager::Init();
|
PixelShaderManager::Init();
|
||||||
|
|
||||||
|
g_Config.VerifyValidity();
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user