wined3d: Add missing GL locking to shader_backend_t.shader_select() calls.
This commit is contained in:
parent
7f14ea01c6
commit
b7ac22004f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue