From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/arb_program_shader.c | 12 ++++++------ dlls/wined3d/ati_fragment_shader.c | 4 ++-- dlls/wined3d/ffp_gl.c | 4 ++-- dlls/wined3d/glsl_shader.c | 8 ++++---- dlls/wined3d/nvidia_texture_shader.c | 10 +++++----- dlls/wined3d/shader.c | 4 ++-- dlls/wined3d/shader_spirv.c | 8 ++++---- dlls/wined3d/wined3d_private.h | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 19d6df81b58..6bc526877ab 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -4630,7 +4630,7 @@ static void shader_arb_update_graphics_shaders(struct shader_arb_priv *priv, GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, compiled->prgId)); checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, compiled->prgId);");
- priv->fragment_pipe->fp_enable(context, FALSE); + priv->fragment_pipe->fp_enable(context, state);
/* Enable OpenGL fragment programs. Note that we may have already * disabled them when disabling the fragment pipeline. */ @@ -4677,7 +4677,7 @@ static void shader_arb_update_graphics_shaders(struct shader_arb_priv *priv, gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); } - priv->fragment_pipe->fp_enable(context, TRUE); + priv->fragment_pipe->fp_enable(context, state); }
if (use_vs(state)) @@ -4706,7 +4706,7 @@ static void shader_arb_update_graphics_shaders(struct shader_arb_priv *priv, GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, compiled->prgId)); checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, compiled->prgId);");
- priv->vertex_pipe->vp_enable(context, FALSE); + priv->vertex_pipe->vp_enable(context, state);
/* Enable OpenGL vertex programs */ gl_info->gl_ops.gl.p_glEnable(GL_VERTEX_PROGRAM_ARB); @@ -4736,7 +4736,7 @@ static void shader_arb_update_graphics_shaders(struct shader_arb_priv *priv, gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB); checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)"); } - priv->vertex_pipe->vp_enable(context, TRUE); + priv->vertex_pipe->vp_enable(context, state); } }
@@ -5740,11 +5740,11 @@ struct arbfp_ffp_desc };
/* Context activation is done by the caller. */ -static void arbfp_enable(const struct wined3d_context *context, BOOL enable) +static void arbfp_enable(const struct wined3d_context *context, const struct wined3d_state *state) { const struct wined3d_gl_info *gl_info = wined3d_context_gl_const(context)->gl_info;
- if (enable) + if (!use_ps(state)) { gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB)"); diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 058fd1680a9..c488803326b 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1251,11 +1251,11 @@ static const struct wined3d_state_entry_template atifs_fragmentstate_template[] };
/* Context activation is done by the caller. */ -static void atifs_enable(const struct wined3d_context *context, BOOL enable) +static void atifs_enable(const struct wined3d_context *context, const struct wined3d_state *state) { const struct wined3d_gl_info *gl_info = wined3d_context_gl_const(context)->gl_info;
- if (enable) + if (!use_ps(state)) { gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_SHADER_ATI); checkGLcall("glEnable(GL_FRAGMENT_SHADER_ATI)"); diff --git a/dlls/wined3d/ffp_gl.c b/dlls/wined3d/ffp_gl.c index a9c6bd9fbb2..7e3df1c1fc6 100644 --- a/dlls/wined3d/ffp_gl.c +++ b/dlls/wined3d/ffp_gl.c @@ -4840,7 +4840,7 @@ static const struct wined3d_state_entry_template ffp_fragmentstate_template[] = };
/* Context activation is done by the caller. */ -static void ffp_pipe_enable(const struct wined3d_context *context, BOOL enable) {} +static void ffp_pipe_enable(const struct wined3d_context *context, const struct wined3d_state *state) {}
static void ffp_pipe_disable(const struct wined3d_context *context) {}
@@ -4967,7 +4967,7 @@ const struct wined3d_fragment_pipe_ops ffp_fragment_pipeline = .states = ffp_fragmentstate_template, };
-static void none_pipe_enable(const struct wined3d_context *context, BOOL enable) {} +static void none_pipe_enable(const struct wined3d_context *context, const struct wined3d_state *state) {}
static void none_pipe_disable(const struct wined3d_context *context) {}
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index f6697773bb2..087923d3c39 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -10704,8 +10704,8 @@ static void shader_glsl_update_graphics_program(struct shader_glsl_priv *priv, GLenum current_vertex_color_clamp; GLuint program_id, prev_id;
- priv->vertex_pipe->vp_enable(&context_gl->c, !use_vs(state)); - priv->fragment_pipe->fp_enable(&context_gl->c, !use_ps(state)); + priv->vertex_pipe->vp_enable(&context_gl->c, state); + priv->fragment_pipe->fp_enable(&context_gl->c, state);
prev_id = ctx_data->glsl_program ? ctx_data->glsl_program->id : 0; set_glsl_shader_program(context_gl, state, priv, ctx_data); @@ -11563,7 +11563,7 @@ const struct wined3d_shader_backend_ops glsl_shader_backend = shader_glsl_shader_compile, };
-static void glsl_vertex_pipe_vp_enable(const struct wined3d_context *context, BOOL enable) {} +static void glsl_vertex_pipe_vp_enable(const struct wined3d_context *context, const struct wined3d_state *state) {}
static void glsl_vertex_pipe_vp_disable(const struct wined3d_context *context) {}
@@ -12060,7 +12060,7 @@ const struct wined3d_vertex_pipe_ops glsl_vertex_pipe = .vp_states = glsl_vertex_pipe_vp_states, };
-static void glsl_fragment_pipe_enable(const struct wined3d_context *context, BOOL enable) +static void glsl_fragment_pipe_enable(const struct wined3d_context *context, const struct wined3d_state *state) { /* Nothing to do. */ } diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index 14510b25f0e..445acd0598b 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -660,11 +660,11 @@ static void nvrc_texfactor(struct wined3d_context *context, const struct wined3d }
/* Context activation is done by the caller. */ -static void nvrc_enable(const struct wined3d_context *context, BOOL enable) +static void nvrc_enable(const struct wined3d_context *context, const struct wined3d_state *state) { const struct wined3d_gl_info *gl_info = wined3d_context_gl_const(context)->gl_info;
- if (enable) + if (!use_ps(state)) { gl_info->gl_ops.gl.p_glEnable(GL_REGISTER_COMBINERS_NV); checkGLcall("glEnable(GL_REGISTER_COMBINERS_NV)"); @@ -685,12 +685,12 @@ static void nvrc_disable(const struct wined3d_context *context) }
/* Context activation is done by the caller. */ -static void nvts_enable(const struct wined3d_context *context, BOOL enable) +static void nvts_enable(const struct wined3d_context *context, const struct wined3d_state *state) { const struct wined3d_gl_info *gl_info = wined3d_context_gl_const(context)->gl_info;
- nvrc_enable(context, enable); - if (enable) + nvrc_enable(context, state); + if (!use_ps(state)) { gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_SHADER_NV); checkGLcall("glEnable(GL_TEXTURE_SHADER_NV)"); diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index a130fe69583..9c28ba89b49 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1943,8 +1943,8 @@ static void shader_none_select(void *shader_priv, struct wined3d_context *contex { struct shader_none_priv *priv = shader_priv;
- priv->vertex_pipe->vp_enable(context, !use_vs(state)); - priv->fragment_pipe->fp_enable(context, !use_ps(state)); + priv->vertex_pipe->vp_enable(context, state); + priv->fragment_pipe->fp_enable(context, state); }
/* Context activation is done by the caller. */ diff --git a/dlls/wined3d/shader_spirv.c b/dlls/wined3d/shader_spirv.c index c58d9d0efb4..f2bad66e2e7 100644 --- a/dlls/wined3d/shader_spirv.c +++ b/dlls/wined3d/shader_spirv.c @@ -826,8 +826,8 @@ static void shader_spirv_select(void *shader_priv, struct wined3d_context *conte enum wined3d_shader_type shader_type; struct wined3d_shader *shader;
- priv->vertex_pipe->vp_enable(context, !use_vs(state)); - priv->fragment_pipe->fp_enable(context, !use_ps(state)); + priv->vertex_pipe->vp_enable(context, state); + priv->fragment_pipe->fp_enable(context, state);
bindings = &priv->bindings; memcpy(binding_base, bindings->binding_base, sizeof(bindings->binding_base)); @@ -1136,7 +1136,7 @@ const struct wined3d_shader_backend_ops *wined3d_spirv_shader_backend_init_vk(vo return &spirv_shader_backend_vk; }
-static void spirv_vertex_pipe_vk_vp_enable(const struct wined3d_context *context, BOOL enable) +static void spirv_vertex_pipe_vk_vp_enable(const struct wined3d_context *context, const struct wined3d_state *state) { /* Nothing to do. */ } @@ -1218,7 +1218,7 @@ const struct wined3d_vertex_pipe_ops *wined3d_spirv_vertex_pipe_init_vk(void) return &spirv_vertex_pipe_vk; }
-static void spirv_fragment_pipe_vk_fp_enable(const struct wined3d_context *context, BOOL enable) +static void spirv_fragment_pipe_vk_fp_enable(const struct wined3d_context *context, const struct wined3d_state *state) { /* Nothing to do. */ } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f7503c65205..4f9761efa46 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2001,7 +2001,7 @@ struct wined3d_state_entry_template
struct wined3d_fragment_pipe_ops { - void (*fp_enable)(const struct wined3d_context *context, BOOL enable); + void (*fp_enable)(const struct wined3d_context *context, const struct wined3d_state *state); void (*fp_disable)(const struct wined3d_context *context); void (*get_caps)(const struct wined3d_adapter *adapter, struct fragment_caps *caps); unsigned int (*get_emul_mask)(const struct wined3d_adapter *adapter); @@ -2029,7 +2029,7 @@ struct wined3d_vertex_caps
struct wined3d_vertex_pipe_ops { - void (*vp_enable)(const struct wined3d_context *context, BOOL enable); + void (*vp_enable)(const struct wined3d_context *context, const struct wined3d_state *state); void (*vp_disable)(const struct wined3d_context *context); void (*vp_get_caps)(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps); unsigned int (*vp_get_emul_mask)(const struct wined3d_adapter *adapter);