From 59689262e74d7f69ecf8a1b641d7e503ce3f00d5 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 12 May 2009 16:19:55 +0200 Subject: [PATCH] wined3d: Add missing GL locking to shader_backend_t.shader_free_private() implementations. --- dlls/wined3d/arb_program_shader.c | 2 ++ dlls/wined3d/glsl_shader.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 9b21f0e8749..beb37cf8b05 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -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); } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b248a3b37e7..8316a0e7501 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -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);