Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 22 ++-------------------- dlls/wined3d/wined3d_main.c | 2 -- dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 2f2d09db794..6941459a8cd 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4178,22 +4178,6 @@ static void wined3d_adapter_init_fb_cfgs(struct wined3d_adapter *adapter, HDC dc } }
-static DWORD get_max_gl_version(const struct wined3d_gl_info *gl_info, DWORD flags) -{ - const char *gl_vendor, *gl_renderer; - - if (wined3d_settings.explicit_gl_version) - return wined3d_settings.max_gl_version; - - gl_vendor = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_VENDOR); - gl_renderer = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_RENDERER); - if (!gl_vendor || !gl_renderer - || wined3d_guess_card_vendor(gl_vendor, gl_renderer) == HW_VENDOR_NVIDIA) - return MAKEDWORD_VERSION(1, 0); - - return wined3d_settings.max_gl_version; -} - static const struct wined3d_adapter_ops wined3d_adapter_gl_ops = { wined3d_adapter_gl_create_context, @@ -4209,7 +4193,6 @@ BOOL wined3d_adapter_gl_init(struct wined3d_adapter *adapter, DWORD wined3d_crea }; struct wined3d_gl_info *gl_info = &adapter->gl_info; struct wined3d_caps_gl_ctx caps_gl_ctx = {0}; - DWORD max_gl_version; unsigned int i;
TRACE("adapter %p, wined3d_creation_flags %#x.\n", adapter, wined3d_creation_flags); @@ -4245,16 +4228,15 @@ BOOL wined3d_adapter_gl_init(struct wined3d_adapter *adapter, DWORD wined3d_crea return FALSE; }
- max_gl_version = get_max_gl_version(gl_info, wined3d_creation_flags); for (i = 0; i < ARRAY_SIZE(supported_gl_versions); ++i) { - if (supported_gl_versions[i] <= max_gl_version) + if (supported_gl_versions[i] <= wined3d_settings.max_gl_version) break; } if (i == ARRAY_SIZE(supported_gl_versions)) { ERR_(winediag)("Requested invalid GL version %u.%u.\n", - max_gl_version >> 16, max_gl_version & 0xffff); + wined3d_settings.max_gl_version >> 16, wined3d_settings.max_gl_version & 0xffff); i = ARRAY_SIZE(supported_gl_versions) - 1; }
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 3537a4884fe..ca83d0ae0d9 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -73,7 +73,6 @@ static CRITICAL_SECTION wined3d_wndproc_cs = {&wined3d_wndproc_cs_debug, -1, 0, struct wined3d_settings wined3d_settings = { TRUE, /* Multithreaded CS by default. */ - FALSE, /* explicit_gl_version */ MAKEDWORD_VERSION(4, 4), /* Default to OpenGL 4.4 */ TRUE, /* Use of GLSL enabled by default */ ORM_FBO, /* Use FBOs to do offscreen rendering */ @@ -217,7 +216,6 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) { ERR_(winediag)("Setting maximum allowed wined3d GL version to %u.%u.\n", tmpvalue >> 16, tmpvalue & 0xffff); - wined3d_settings.explicit_gl_version = TRUE; wined3d_settings.max_gl_version = tmpvalue; } if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) ) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b5e3c79d4fc..ccb7130460a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -374,7 +374,6 @@ static inline void wined3d_pause(void) struct wined3d_settings { unsigned int cs_multithreaded; - BOOL explicit_gl_version; DWORD max_gl_version; BOOL use_glsl; int offscreen_rendering_mode;