Commit bf187ed1 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Set the sampler only once in shader_glsl_select_depth_blt().

It (obviously) never changes.
parent 2188aa87
......@@ -3458,15 +3458,16 @@ static void shader_glsl_select_depth_blt(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
struct shader_glsl_priv *priv = (struct shader_glsl_priv *) This->shader_priv;
static GLhandleARB loc = -1;
if (!priv->depth_blt_glsl_program_id) {
GLhandleARB loc;
priv->depth_blt_glsl_program_id = create_glsl_blt_shader(gl_info);
loc = GL_EXTCALL(glGetUniformLocationARB(priv->depth_blt_glsl_program_id, "sampler"));
GL_EXTCALL(glUseProgramObjectARB(priv->depth_blt_glsl_program_id));
GL_EXTCALL(glUniform1iARB(loc, 0));
} else {
GL_EXTCALL(glUseProgramObjectARB(priv->depth_blt_glsl_program_id));
}
GL_EXTCALL(glUseProgramObjectARB(priv->depth_blt_glsl_program_id));
GL_EXTCALL(glUniform1iARB(loc, 0));
}
static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) {
......
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