wined3d: Limit GLSL version to 1.30 when OpenGL 3 is not supported.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2019-10-30 16:11:43 +01:00 committed by Alexandre Julliard
parent 7dbdbcce46
commit dee191390c
1 changed files with 6 additions and 0 deletions

View File

@ -3742,6 +3742,12 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
/* The format of the GLSL version string is "major.minor[.release] [vendor info]". */
sscanf(str, "%u.%u", &major, &minor);
gl_info->glsl_version = MAKEDWORD_VERSION(major, minor);
if (gl_info->glsl_version > MAKEDWORD_VERSION(1, 30) && gl_version < MAKEDWORD_VERSION(3, 0))
{
WARN("OpenGL version %u.%u too low, limiting GLSL version to 1.30.\n",
gl_version >> 16, gl_version & 0xffff);
gl_info->glsl_version = MAKEDWORD_VERSION(1, 30);
}
if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30))
gl_info->supported[WINED3D_GLSL_130] = TRUE;
}