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

wined3d: Add missing GL locking to shader_backend_t.shader_select() calls.

parent 7f14ea01
......@@ -1120,7 +1120,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex
/* TODO: Use a display list */
/* Disable shaders */
ENTER_GL();
This->shader_backend->shader_select((IWineD3DDevice *)This, FALSE, FALSE);
LEAVE_GL();
Context_MarkStateDirty(context, STATE_VSHADER, StateTable);
Context_MarkStateDirty(context, STATE_PIXELSHADER, StateTable);
......
......@@ -3889,12 +3889,20 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
ps = (IWineD3DPixelShaderImpl *) This;
if(ps->num_gl_shaders == 0) return;
if (priv->glsl_program && (IWineD3DBaseShader *)priv->glsl_program->pshader == iface)
{
ENTER_GL();
shader_glsl_select(This->baseShader.device, FALSE, FALSE);
LEAVE_GL();
}
} else {
vs = (IWineD3DVertexShaderImpl *) This;
if(vs->num_gl_shaders == 0) return;
if (priv->glsl_program && (IWineD3DBaseShader *)priv->glsl_program->vshader == iface)
{
ENTER_GL();
shader_glsl_select(This->baseShader.device, FALSE, FALSE);
LEAVE_GL();
}
}
linked_programs = &This->baseShader.linked_programs;
......
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