wined3d: Pass a wined3d_context structure to wined3d_vertex_pipe_ops.vp_enable().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d53643ca1d
commit
e8d86d43a8
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue