diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index ca9d0e62291..e1bd3aa9aba 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -4624,13 +4624,12 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, } /* GL locking is done by the caller */ -static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size) +static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, + enum tex_types tex_type, const SIZE *ds_mask_size) { const float mask[] = {0.0f, 0.0f, (float)ds_mask_size->cx, (float)ds_mask_size->cy}; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; BOOL masked = ds_mask_size->cx && ds_mask_size->cy; - struct shader_arb_priv *priv = This->shader_priv; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; + struct shader_arb_priv *priv = shader_priv; GLuint *blt_fprogram; if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 2b1d5b18e0e..3a609e16c01 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -4622,13 +4622,11 @@ static void shader_glsl_select(const struct wined3d_context *context, BOOL usePS } /* GL locking is done by the caller */ -static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, +static void shader_glsl_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, enum tex_types tex_type, const SIZE *ds_mask_size) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; BOOL masked = ds_mask_size->cx && ds_mask_size->cy; - struct shader_glsl_priv *priv = This->shader_priv; + struct shader_glsl_priv *priv = shader_priv; GLhandleARB *blt_program; GLint loc; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index ffe66e86e05..8f4a72d281f 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1510,7 +1510,8 @@ static void shader_cleanup(IWineD3DBaseShader *iface) static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins) {} static void shader_none_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) {} -static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size) {} +static void shader_none_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, + enum tex_types tex_type, const SIZE *ds_mask_size) {} static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {} static void shader_none_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) {} static void shader_none_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) {} diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 6399e634e46..f6b1a10e413 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4102,8 +4102,8 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl if (compare_mode != GL_NONE) glTexParameteri(info.bind_target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); } - device->shader_backend->shader_select_depth_blt((IWineD3DDevice *)device, - info.tex_type, &This->ds_current_size); + device->shader_backend->shader_select_depth_blt(device->shader_priv, + gl_info, info.tex_type, &This->ds_current_size); glBegin(GL_TRIANGLE_STRIP); glTexCoord3fv(info.coords[0]); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a1f2b708f56..d264dcec6a8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -744,7 +744,8 @@ struct wined3d_state; typedef struct { void (*shader_handle_instruction)(const struct wined3d_shader_instruction *); void (*shader_select)(const struct wined3d_context *context, BOOL usePS, BOOL useVS); - void (*shader_select_depth_blt)(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size); + void (*shader_select_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info, + enum tex_types tex_type, const SIZE *ds_mask_size); void (*shader_deselect_depth_blt)(IWineD3DDevice *iface); void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count); void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count);