VirtualBox

Changeset 47061 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Jul 9, 2013 5:26:01 PM (12 years ago)
Author:
vboxsync
Message:

wined3d: fix shader cleanup

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/Makefile.kmk

    r46602 r47061  
    173173        VBOX_WITH_WINE_FIX_TEXCLEAR \
    174174        VBOX_WITH_WINE_FIX_STRINFOBUF \
     175        VBOX_WITH_WINE_FIX_SHADERCLEANUP \
    175176        VBOX_WITH_WINE_DBG
    176177#wined3d_DEFS        += VBOX_WITH_WINE_FIXES
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/glsl_shader.c

    r46521 r47061  
    41874187}
    41884188
     4189#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     4190static void shader_glsl_disable(void *shader_priv, const struct wined3d_context *context);
     4191#endif
     4192
    41894193/* Context activation is done by the caller. */
    41904194static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const struct wined3d_gl_info *gl_info,
    4191         struct glsl_shader_prog_link *entry)
     4195        struct glsl_shader_prog_link *entry
     4196#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     4197        , struct wined3d_context *context
     4198#endif
     4199        )
    41924200{
    41934201    struct glsl_program_key key;
     
    41974205    key.ps_id = entry->ps.id;
    41984206    wine_rb_remove(&priv->program_lookup, &key);
     4207#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     4208    if (priv->glsl_program == entry)
     4209    {
     4210        shader_glsl_disable(priv, context);
     4211        Assert(!priv->glsl_program);
     4212    }
     4213#endif
    41994214
    42004215    GL_EXTCALL(glDeleteObjectARB(entry->programId));
     
    61936208                        struct glsl_shader_prog_link, ps.shader_entry)
    61946209                {
    6195                     delete_glsl_program_entry(priv, gl_info, entry);
     6210                    delete_glsl_program_entry(priv, gl_info, entry
     6211#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     6212                            , context
     6213#endif
     6214                            );
    61966215                }
    61976216
     
    62166235                        struct glsl_shader_prog_link, vs.shader_entry)
    62176236                {
    6218                     delete_glsl_program_entry(priv, gl_info, entry);
     6237                    delete_glsl_program_entry(priv, gl_info, entry
     6238#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     6239                            , context
     6240#endif
     6241                    );
    62196242                }
    62206243
     
    62396262                        struct glsl_shader_prog_link, gs.shader_entry)
    62406263                {
    6241                     delete_glsl_program_entry(priv, gl_info, entry);
     6264                    delete_glsl_program_entry(priv, gl_info, entry
     6265#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     6266                            , context
     6267#endif
     6268                            );
    62426269                }
    62436270
     
    67096736            struct glsl_shader_prog_link, vs.shader_entry)
    67106737    {
    6711         delete_glsl_program_entry(ctx->priv, ctx->gl_info, program);
     6738        delete_glsl_program_entry(ctx->priv, ctx->gl_info, program
     6739#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     6740                            , NULL
     6741#endif
     6742                            );
    67126743    }
    67136744    ctx->gl_info->gl_ops.ext.p_glDeleteObjectARB(shader->id);
     
    69707001            struct glsl_shader_prog_link, ps.shader_entry)
    69717002    {
    6972         delete_glsl_program_entry(ctx->priv, ctx->gl_info, program);
     7003        delete_glsl_program_entry(ctx->priv, ctx->gl_info, program
     7004#ifdef VBOX_WITH_WINE_FIX_SHADERCLEANUP
     7005                            , context
     7006#endif
     7007                            );
    69737008    }
    69747009    ctx->gl_info->gl_ops.ext.p_glDeleteObjectARB(shader->id);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette