[PATCH 5/5] wined3d: Pass a wined3d_context structure to wined3d_vertex_pipe_ops.vp_enable().
Henri Verbeet
hverbeet at codeweavers.com
Mon Jul 29 05:44:50 CDT 2019
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/arb_program_shader.c | 6 +++---
dlls/wined3d/glsl_shader.c | 6 +++---
dlls/wined3d/shader.c | 4 ++--
dlls/wined3d/state.c | 6 ++++--
dlls/wined3d/wined3d_private.h | 2 +-
5 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 0628c7cddbb..f91ff871081 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -4659,7 +4659,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id));
checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id);");
- priv->vertex_pipe->vp_enable(gl_info, FALSE);
+ priv->vertex_pipe->vp_enable(context, FALSE);
/* Enable OpenGL vertex programs */
gl_info->gl_ops.gl.p_glEnable(GL_VERTEX_PROGRAM_ARB);
@@ -4690,7 +4690,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB);
checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)");
}
- priv->vertex_pipe->vp_enable(gl_info, TRUE);
+ priv->vertex_pipe->vp_enable(context, TRUE);
}
}
@@ -4720,7 +4720,7 @@ static void shader_arb_disable(void *shader_priv, struct wined3d_context *contex
gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB);
checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)");
}
- priv->vertex_pipe->vp_enable(gl_info, FALSE);
+ priv->vertex_pipe->vp_enable(context, FALSE);
if (gl_info->supported[ARB_COLOR_BUFFER_FLOAT] && priv->last_vs_color_unclamp)
{
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 89a34c84ed5..d5003293e6d 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -10553,7 +10553,7 @@ static void shader_glsl_select(void *shader_priv, struct wined3d_context *contex
GLenum current_vertex_color_clamp;
GLuint program_id, prev_id;
- priv->vertex_pipe->vp_enable(gl_info, !use_vs(state));
+ priv->vertex_pipe->vp_enable(context, !use_vs(state));
priv->fragment_pipe->enable_extension(gl_info, !use_ps(state));
prev_id = ctx_data->glsl_program ? ctx_data->glsl_program->id : 0;
@@ -10655,7 +10655,7 @@ static void shader_glsl_disable(void *shader_priv, struct wined3d_context *conte
GL_EXTCALL(glUseProgram(0));
checkGLcall("glUseProgram");
- priv->vertex_pipe->vp_enable(gl_info, FALSE);
+ priv->vertex_pipe->vp_enable(context, FALSE);
priv->fragment_pipe->enable_extension(gl_info, FALSE);
if (needs_legacy_glsl_syntax(gl_info) && gl_info->supported[ARB_COLOR_BUFFER_FLOAT])
@@ -11399,7 +11399,7 @@ const struct wined3d_shader_backend_ops glsl_shader_backend =
shader_glsl_has_ffp_proj_control,
};
-static void glsl_vertex_pipe_vp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {}
+static void glsl_vertex_pipe_vp_enable(const struct wined3d_context *context, BOOL enable) {}
static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps)
{
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index c23305988b4..e0055f6ff16 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -3188,7 +3188,7 @@ static void shader_none_select(void *shader_priv, struct wined3d_context *contex
const struct wined3d_gl_info *gl_info = context->gl_info;
struct shader_none_priv *priv = shader_priv;
- priv->vertex_pipe->vp_enable(gl_info, !use_vs(state));
+ priv->vertex_pipe->vp_enable(context, !use_vs(state));
priv->fragment_pipe->enable_extension(gl_info, !use_ps(state));
}
@@ -3198,7 +3198,7 @@ static void shader_none_disable(void *shader_priv, struct wined3d_context *conte
struct shader_none_priv *priv = shader_priv;
const struct wined3d_gl_info *gl_info = context->gl_info;
- priv->vertex_pipe->vp_enable(gl_info, FALSE);
+ priv->vertex_pipe->vp_enable(context, FALSE);
priv->fragment_pipe->enable_extension(gl_info, FALSE);
context->shader_update_mask = (1u << WINED3D_SHADER_TYPE_PIXEL)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 06b30ba5e1e..6df20a40d74 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -5187,6 +5187,7 @@ static const struct wined3d_state_entry_template ffp_fragmentstate_template[] =
/* Context activation is done by the caller. */
static void ffp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {}
+static void ffp_pipe_enable(const struct wined3d_context *context, BOOL enable) {}
static void *ffp_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv)
{
@@ -5225,7 +5226,7 @@ static DWORD vp_ffp_get_emul_mask(const struct wined3d_gl_info *gl_info)
const struct wined3d_vertex_pipe_ops ffp_vertex_pipe =
{
- ffp_enable,
+ ffp_pipe_enable,
vp_ffp_get_caps,
vp_ffp_get_emul_mask,
ffp_alloc,
@@ -5309,6 +5310,7 @@ const struct fragment_pipeline ffp_fragment_pipeline = {
};
static void none_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {}
+static void none_pipe_enable(const struct wined3d_context *context, BOOL enable) {}
static void *none_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv)
{
@@ -5329,7 +5331,7 @@ static DWORD vp_none_get_emul_mask(const struct wined3d_gl_info *gl_info)
const struct wined3d_vertex_pipe_ops none_vertex_pipe =
{
- none_enable,
+ none_pipe_enable,
vp_none_get_caps,
vp_none_get_emul_mask,
none_alloc,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b959a280608..801b467436b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2188,7 +2188,7 @@ struct wined3d_vertex_caps
struct wined3d_vertex_pipe_ops
{
- void (*vp_enable)(const struct wined3d_gl_info *gl_info, BOOL enable);
+ void (*vp_enable)(const struct wined3d_context *context, BOOL enable);
void (*vp_get_caps)(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps);
DWORD (*vp_get_emul_mask)(const struct wined3d_gl_info *gl_info);
void *(*vp_alloc)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv);
--
2.11.0
More information about the wine-devel
mailing list