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

Alexandre Julliard julliard at winehq.org
Thu Oct 31 17:39:28 CDT 2019


Module: wine
Branch: master
Commit: dee191390cab67feecc2ab16a7d8b8932e551159
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=dee191390cab67feecc2ab16a7d8b8932e551159

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Oct 30 16:11:43 2019 +0100

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

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/adapter_gl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index e83aebfa56..52f0fd7ae1 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -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;
     }




More information about the wine-cvs mailing list