Commit 7363b0e9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Explicitly pass data and gl_info to shader_deselect_depth_blt().

parent 93a824d7
...@@ -4644,17 +4644,18 @@ static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_ ...@@ -4644,17 +4644,18 @@ static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) { static void shader_arb_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info)
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; {
struct shader_arb_priv *priv = This->shader_priv; struct shader_arb_priv *priv = shader_priv;
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
if (priv->current_vprogram_id) { if (priv->current_vprogram_id) {
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id)); GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id));
checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, vertexShader->prgId);"); checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, vertexShader->prgId);");
TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", This, priv->current_vprogram_id); TRACE("Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB.\n", priv->current_vprogram_id);
} else { }
else
{
glDisable(GL_VERTEX_PROGRAM_ARB); glDisable(GL_VERTEX_PROGRAM_ARB);
checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)"); checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)");
} }
...@@ -4663,8 +4664,10 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) { ...@@ -4663,8 +4664,10 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id)); GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id));
checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, pixelShader->prgId);"); checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, pixelShader->prgId);");
TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", This, priv->current_fprogram_id); TRACE("Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB.\n", priv->current_fprogram_id);
} else if(!priv->use_arbfp_fixed_func) { }
else if(!priv->use_arbfp_fixed_func)
{
glDisable(GL_FRAGMENT_PROGRAM_ARB); glDisable(GL_FRAGMENT_PROGRAM_ARB);
checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)");
} }
......
...@@ -4651,10 +4651,9 @@ static void shader_glsl_select_depth_blt(void *shader_priv, const struct wined3d ...@@ -4651,10 +4651,9 @@ static void shader_glsl_select_depth_blt(void *shader_priv, const struct wined3d
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) { static void shader_glsl_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info)
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; {
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; struct shader_glsl_priv *priv = shader_priv;
struct shader_glsl_priv *priv = This->shader_priv;
GLhandleARB program_id; GLhandleARB program_id;
program_id = priv->glsl_program ? priv->glsl_program->programId : 0; program_id = priv->glsl_program ? priv->glsl_program->programId : 0;
......
...@@ -1512,7 +1512,7 @@ static void shader_none_handle_instruction(const struct wined3d_shader_instructi ...@@ -1512,7 +1512,7 @@ static void shader_none_handle_instruction(const struct wined3d_shader_instructi
static void shader_none_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) {} static void shader_none_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) {}
static void shader_none_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, 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) {} enum tex_types tex_type, const SIZE *ds_mask_size) {}
static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {} static void shader_none_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info) {}
static void shader_none_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) {} 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) {} static void shader_none_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) {}
static void shader_none_load_constants(const struct wined3d_context *context, char usePS, char useVS) {} static void shader_none_load_constants(const struct wined3d_context *context, char usePS, char useVS) {}
......
...@@ -4121,7 +4121,7 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl ...@@ -4121,7 +4121,7 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl
glPopAttrib(); glPopAttrib();
device->shader_backend->shader_deselect_depth_blt((IWineD3DDevice *)device); device->shader_backend->shader_deselect_depth_blt(device->shader_priv, gl_info);
} }
void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, void surface_modify_ds_location(IWineD3DSurfaceImpl *surface,
......
...@@ -746,7 +746,7 @@ typedef struct { ...@@ -746,7 +746,7 @@ typedef struct {
void (*shader_select)(const struct wined3d_context *context, BOOL usePS, BOOL useVS); void (*shader_select)(const struct wined3d_context *context, BOOL usePS, BOOL useVS);
void (*shader_select_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info, 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); enum tex_types tex_type, const SIZE *ds_mask_size);
void (*shader_deselect_depth_blt)(IWineD3DDevice *iface); void (*shader_deselect_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info);
void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count); void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count);
void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count); void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count);
void (*shader_load_constants)(const struct wined3d_context *context, char usePS, char useVS); void (*shader_load_constants)(const struct wined3d_context *context, char usePS, char useVS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment