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

This commit is contained in:
Henri Verbeet 2009-05-12 16:19:56 +02:00 committed by Alexandre Julliard
parent 7f14ea01c6
commit b7ac22004f
2 changed files with 11 additions and 0 deletions

View File

@ -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);

View File

@ -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;