VirtualBox

Changeset 37873 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jul 11, 2011 2:33:28 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72771
Message:

wddm/wine: do not delete openned shared resource

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c

    r35650 r37873  
    112112    IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
    113113    IWineD3DDeviceImpl *device = This->resource.device;
    114     struct wined3d_context *context = NULL;
    115 
    116     if (This->baseTexture.texture_rgb.name || This->baseTexture.texture_srgb.name)
    117     {
    118         context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
    119     }
    120 
    121     if(This->baseTexture.texture_rgb.name) {
    122         gltexture_delete(&This->baseTexture.texture_rgb);
    123     }
    124     if(This->baseTexture.texture_srgb.name) {
    125         gltexture_delete(&This->baseTexture.texture_srgb);
    126     }
    127 
    128     if (context) context_release(context);
     114
     115#ifdef VBOX_WITH_WDDM
     116    if (VBOXSHRC_IS_SHARED_OPENED(This))
     117    {
     118        This->baseTexture.texture_rgb.name = 0;
     119        This->baseTexture.texture_srgb.name = 0;
     120    }
     121    else
     122#endif
     123    {
     124        struct wined3d_context *context = NULL;
     125        if (This->baseTexture.texture_rgb.name || This->baseTexture.texture_srgb.name)
     126        {
     127            context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
     128        }
     129
     130        if(This->baseTexture.texture_rgb.name) {
     131            gltexture_delete(&This->baseTexture.texture_rgb);
     132        }
     133        if(This->baseTexture.texture_srgb.name) {
     134            gltexture_delete(&This->baseTexture.texture_srgb);
     135        }
     136
     137        if (context) context_release(context);
     138    }
    129139
    130140    This->baseTexture.texture_rgb.dirty = TRUE;
  • TabularUnified trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c

    r35650 r37873  
    62686268    if (surface->texture_name)
    62696269    {
    6270         struct wined3d_context *context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
    6271         ENTER_GL();
    6272         glDeleteTextures(1, &surface->texture_name);
    6273         LEAVE_GL();
    6274         context_release(context);
     6270#ifdef VBOX_WITH_WDDM
     6271# ifdef DEBUG_misha
     6272        /* shared case needs testing! */
     6273        Assert(!VBOXSHRC_IS_SHARED(surface));
     6274# endif
     6275        if (!VBOXSHRC_IS_SHARED_OPENED(surface))
     6276#endif
     6277        {
     6278            struct wined3d_context *context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
     6279            ENTER_GL();
     6280            glDeleteTextures(1, &surface->texture_name);
     6281            LEAVE_GL();
     6282            context_release(context);
     6283        }
    62756284        surface->texture_name = 0;
    62766285        surface->Flags &= ~SFLAG_CLIENT;
  • TabularUnified trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c

    r37870 r37873  
    9898    ENTER_GL();
    9999
    100     if (This->texture_name)
     100    if (This->texture_name
     101#ifdef VBOX_WITH_WDDM
     102            && !VBOXSHRC_IS_SHARED_OPENED(This)
     103#endif
     104            )
    101105    {
    102106        /* Release the OpenGL texture. */
     
    14071411    if(!texture) {
    14081412        ENTER_GL();
    1409         glDeleteTextures(1, &This->texture_name);
     1413#ifdef VBOX_WITH_WDDM
     1414        if (!VBOXSHRC_IS_SHARED_OPENED(This))
     1415#endif
     1416            glDeleteTextures(1, &This->texture_name);
    14101417        This->texture_name = 0;
    1411         glDeleteTextures(1, &This->texture_name_srgb);
     1418#ifdef VBOX_WITH_WDDM
     1419        if (!VBOXSHRC_IS_SHARED_OPENED(This))
     1420#endif
     1421            glDeleteTextures(1, &This->texture_name_srgb);
    14121422        This->texture_name_srgb = 0;
    14131423        LEAVE_GL();
Note: See TracChangeset for help on using the changeset viewer.

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