wined3d: Explicitly pass data and gl_info to shader_deselect_depth_blt().
This commit is contained in:
parent
93a824d744
commit
7363b0e98a
|
@ -4644,17 +4644,18 @@ static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_
|
|||
}
|
||||
|
||||
/* GL locking is done by the caller */
|
||||
static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
struct shader_arb_priv *priv = This->shader_priv;
|
||||
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
|
||||
static void shader_arb_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
struct shader_arb_priv *priv = shader_priv;
|
||||
|
||||
if (priv->current_vprogram_id) {
|
||||
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id));
|
||||
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);
|
||||
} else {
|
||||
TRACE("Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB.\n", priv->current_vprogram_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)");
|
||||
}
|
||||
|
@ -4663,8 +4664,10 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
|
|||
GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id));
|
||||
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);
|
||||
} else if(!priv->use_arbfp_fixed_func) {
|
||||
TRACE("Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB.\n", priv->current_fprogram_id);
|
||||
}
|
||||
else if(!priv->use_arbfp_fixed_func)
|
||||
{
|
||||
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
|
|||
}
|
||||
|
||||
/* GL locking is done by the caller */
|
||||
static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
|
||||
struct shader_glsl_priv *priv = This->shader_priv;
|
||||
static void shader_glsl_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
struct shader_glsl_priv *priv = shader_priv;
|
||||
GLhandleARB program_id;
|
||||
|
||||
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
|
|||
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,
|
||||
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_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) {}
|
||||
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
|
|||
|
||||
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,
|
||||
|
|
|
@ -746,7 +746,7 @@ typedef struct {
|
|||
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,
|
||||
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_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count);
|
||||
void (*shader_load_constants)(const struct wined3d_context *context, char usePS, char useVS);
|
||||
|
|
Loading…
Reference in New Issue