Matteo Bruni : wined3d: Compare interpolation mode VS compilation arguments.
Alexandre Julliard
julliard at winehq.org
Tue Jun 5 17:06:41 CDT 2018
Module: wine
Branch: master
Commit: 42ace9d445fb4054b91ca005092be7d379f6a528
URL: https://source.winehq.org/git/wine.git/?a=commit;h=42ace9d445fb4054b91ca005092be7d379f6a528
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Mon Jun 4 20:32:31 2018 +0200
wined3d: Compare interpolation mode VS compilation arguments.
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/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 d6615d7..a99762b 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 8a6307a..20d4f07 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
More information about the wine-cvs
mailing list