Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Fix for bug 45127.
dlls/wined3d/glsl_shader.c | 10 +++++++--- dlls/wined3d/shader.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index d6615d7c605..a99762b151f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8537,8 +8537,10 @@ static GLuint find_glsl_pshader(const struct wined3d_context *context, static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const struct vs_compile_args *new, const DWORD use_map) { - if((stored->swizzle_map & use_map) != new->swizzle_map) return FALSE; - if((stored->clip_enabled) != new->clip_enabled) return FALSE; + if ((stored->swizzle_map & use_map) != new->swizzle_map) + return FALSE; + if ((stored->clip_enabled) != new->clip_enabled) + return FALSE; if (stored->point_size != new->point_size) return FALSE; if (stored->per_vertex_point_size != new->per_vertex_point_size) @@ -8549,7 +8551,9 @@ static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const str return FALSE; if (stored->next_shader_input_count != new->next_shader_input_count) return FALSE; - return stored->fog_src == new->fog_src; + if (stored->fog_src != new->fog_src) + return FALSE; + return !memcmp(stored->interpolation_mode, new->interpolation_mode, sizeof(new->interpolation_mode)); }
static GLuint find_glsl_vshader(const struct wined3d_context *context, struct shader_glsl_priv *priv, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 8a6307a3edb..20d4f0773dd 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -3532,7 +3532,7 @@ void find_vs_compile_args(const struct wined3d_state *state, const struct wined3 && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; args->point_size = state->gl_primitive_type == GL_POINTS; args->per_vertex_point_size = shader->reg_maps.point_size; - args->next_shader_type = hull_shader? WINED3D_SHADER_TYPE_HULL + args->next_shader_type = hull_shader ? WINED3D_SHADER_TYPE_HULL : geometry_shader ? WINED3D_SHADER_TYPE_GEOMETRY : WINED3D_SHADER_TYPE_PIXEL; if (shader->reg_maps.shader_version.major >= 4) args->next_shader_input_count = hull_shader ? hull_shader->limits->packed_input