From 54d8f57cc58e5d0d9b962559fe2f7bc071144637 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Fri, 20 May 2016 19:55:59 +0200 Subject: [PATCH] wined3d: Reselect the current GLSL geometry shader when possible even if the VS changed. Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/glsl_shader.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 324b6060f66..d3a0ebfab93 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7447,7 +7447,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_GEOMETRY)) && ctx_data->glsl_program->gs.id) + { gs_id = ctx_data->glsl_program->gs.id; + } else if (gshader) { struct gs_compile_args args; @@ -7462,12 +7464,18 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const struct vs_compile_args vs_compile_args; vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX]; + gshader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]; find_vs_compile_args(state, vshader, context->stream_info.swizzle_map, &vs_compile_args, d3d_info); vs_id = find_glsl_vshader(context, priv, vshader, &vs_compile_args); vs_list = &vshader->linked_programs; - if ((gshader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY])) + if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_GEOMETRY)) + && ctx_data->glsl_program->gs.id) + { + gs_id = ctx_data->glsl_program->gs.id; + } + else if (gshader) { struct gs_compile_args gs_compile_args; -- 2.11.4.GIT