wined3d: Disallow disabling GLSL on core profile contexts.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9e5e87d201
commit
bf9a1a2e91
|
@ -2608,7 +2608,14 @@ static const struct fragment_pipeline *select_fragment_implementation(const stru
|
|||
|
||||
static const struct wined3d_shader_backend_ops *select_shader_backend(const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
BOOL glsl = wined3d_settings.glslRequested && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 20);
|
||||
BOOL glsl = wined3d_settings.use_glsl && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 20);
|
||||
if (!gl_info->supported[WINED3D_GL_LEGACY_CONTEXT] && !wined3d_settings.use_glsl)
|
||||
{
|
||||
ERR_(winediag)("Ignoring the UseGLSL registry key. "
|
||||
"GLSL is the only shader backend available on core profile contexts. "
|
||||
"You need to explicitly set GL version to use legacy contexts.\n");
|
||||
glsl = TRUE;
|
||||
}
|
||||
|
||||
if (glsl && gl_info->supported[ARB_VERTEX_SHADER] && gl_info->supported[ARB_FRAGMENT_SHADER])
|
||||
return &glsl_shader_backend;
|
||||
|
|
|
@ -225,8 +225,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
|
|||
if (!strcmp(buffer,"disabled"))
|
||||
{
|
||||
ERR_(winediag)("The GLSL shader backend has been disabled. You get to keep all the pieces if it breaks.\n");
|
||||
TRACE("Use of GL Shading Language disabled\n");
|
||||
wined3d_settings.glslRequested = FALSE;
|
||||
TRACE("Use of GL Shading Language disabled.\n");
|
||||
wined3d_settings.use_glsl = FALSE;
|
||||
}
|
||||
}
|
||||
if (!get_config_key(hkey, appkey, "OffscreenRenderingMode", buffer, size)
|
||||
|
|
|
@ -385,7 +385,7 @@ struct wined3d_settings
|
|||
unsigned int cs_multithreaded;
|
||||
BOOL explicit_gl_version;
|
||||
DWORD max_gl_version;
|
||||
BOOL glslRequested;
|
||||
BOOL use_glsl;
|
||||
int offscreen_rendering_mode;
|
||||
unsigned short pci_vendor_id;
|
||||
unsigned short pci_device_id;
|
||||
|
|
Loading…
Reference in New Issue