wined3d: Add missing GL locking to shader_backend_t.shader_free_private() implementations.

This commit is contained in:
Henri Verbeet 2009-05-12 16:19:55 +02:00 committed by Alexandre Julliard
parent b5aee04023
commit 59689262e7
2 changed files with 4 additions and 0 deletions

View File

@ -1838,6 +1838,7 @@ static void shader_arb_free(IWineD3DDevice *iface) {
struct shader_arb_priv *priv = This->shader_priv;
int i;
ENTER_GL();
if(priv->depth_blt_vprogram_id) {
GL_EXTCALL(glDeleteProgramsARB(1, &priv->depth_blt_vprogram_id));
}
@ -1846,6 +1847,7 @@ static void shader_arb_free(IWineD3DDevice *iface) {
GL_EXTCALL(glDeleteProgramsARB(1, &priv->depth_blt_fprogram_id[i]));
}
}
LEAVE_GL();
HeapFree(GetProcessHeap(), 0, This->shader_priv);
}

View File

@ -4038,6 +4038,7 @@ static void shader_glsl_free(IWineD3DDevice *iface) {
struct shader_glsl_priv *priv = This->shader_priv;
int i;
ENTER_GL();
for (i = 0; i < tex_type_count; ++i)
{
if (priv->depth_blt_program[i])
@ -4045,6 +4046,7 @@ static void shader_glsl_free(IWineD3DDevice *iface) {
GL_EXTCALL(glDeleteObjectARB(priv->depth_blt_program[i]));
}
}
LEAVE_GL();
hash_table_destroy(priv->glsl_program_lookup, NULL, NULL);
constant_heap_free(&priv->pconst_heap);