[gtk/wip.win32.fixes: 38/38] gskglcompiler.c: Relax check for GL 3.x+ legacy contexts
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip.win32.fixes: 38/38] gskglcompiler.c: Relax check for GL 3.x+ legacy contexts
- Date: Fri, 17 Dec 2021 03:14:07 +0000 (UTC)
commit ba88b12e9bfce1e6c0c3fce111b5e78af0c317cd
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Nov 22 18:41:58 2021 +0800
gskglcompiler.c: Relax check for GL 3.x+ legacy contexts
On Windows with nVidia drivers at least, when we create a legacy context
via wglCreateContext(), we may still get a (W)GL 4.x context. Allow
such contexts to also use GLSL version 130 instead of 110, so that
things do continue to work.
gsk/gl/gskglcompiler.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskglcompiler.c b/gsk/gl/gskglcompiler.c
index ca76c60aae..3449dac50d 100644
--- a/gsk/gl/gskglcompiler.c
+++ b/gsk/gl/gskglcompiler.c
@@ -147,7 +147,8 @@ gsk_gl_compiler_new (GskGLDriver *driver,
gdk_gl_context_get_version (context, &maj, &min);
- if (maj == 3)
+ /* On Windows, legacy contexts can give us a GL 4.x context */
+ if (maj >= 3)
self->glsl_version = SHADER_VERSION_GL3_LEGACY;
else
self->glsl_version = SHADER_VERSION_GL2_LEGACY;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]