=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Request compatibility profile in GLSL for legacy contexts.

Alexandre Julliard julliard at winehq.org
Tue Feb 21 16:56:14 CST 2017


Module: wine
Branch: master
Commit: 30ae841fefb11ee9e6dfb69c438776cf959fca92
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=30ae841fefb11ee9e6dfb69c438776cf959fca92

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Feb 21 13:24:40 2017 +0100

wined3d: Request compatibility profile in GLSL for legacy contexts.

The deprecated GLSL functions are used in the GLSL generated for
legacy contexts.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/glsl_shader.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 72039b7..41adac1 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -366,7 +366,11 @@ static unsigned int shader_glsl_get_version(const struct wined3d_gl_info *gl_inf
 static void shader_glsl_add_version_declaration(struct wined3d_string_buffer *buffer,
         const struct wined3d_gl_info *gl_info, const struct wined3d_shader_version *version)
 {
-    shader_addline(buffer, "#version %u\n", shader_glsl_get_version(gl_info, version));
+    unsigned int glsl_version = shader_glsl_get_version(gl_info, version);
+    if (glsl_version >= 150 && gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
+        shader_addline(buffer, "#version %u compatibility\n", glsl_version);
+    else
+        shader_addline(buffer, "#version %u\n", glsl_version);
 }
 
 static void shader_glsl_append_imm_vec4(struct wined3d_string_buffer *buffer, const float *values)




More information about the wine-cvs mailing list