VirtualBox

Ignore:
Timestamp:
Aug 24, 2010 4:52:58 PM (14 years ago)
Author:
vboxsync
Message:

wine: shared rc support more impl + fixes

File:
1 edited

Legend:

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

    r31828 r31936  
    495495{
    496496    IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     497
     498#if defined(DEBUG_misha) && defined (VBOXWDDM)
     499    if (VBOXSHRC_IS_SHARED(This))
     500    {
     501        Assert(0);
     502    }
     503#endif
    497504
    498505    This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
     
    887894    }
    888895
    889     if (format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED && mem)
    890     {
    891         GL_EXTCALL(glCompressedTexImage2DARB(This->texture_target, This->texture_level,
    892                 internal, width, height, 0, This->resource.size, mem));
    893     }
    894     else
    895     {
    896         glTexImage2D(This->texture_target, This->texture_level,
    897                 internal, width, height, 0, format_desc->glFormat, format_desc->glType, mem);
    898         checkGLcall("glTexImage2D");
     896#ifdef VBOXWDDM
     897    if (!VBOXSHRC_IS_SHARED_OPENED(This))
     898#endif
     899    {
     900        if (format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED && mem)
     901        {
     902            GL_EXTCALL(glCompressedTexImage2DARB(This->texture_target, This->texture_level,
     903                    internal, width, height, 0, This->resource.size, mem));
     904        }
     905        else
     906        {
     907            glTexImage2D(This->texture_target, This->texture_level,
     908                    internal, width, height, 0, format_desc->glFormat, format_desc->glType, mem);
     909            checkGLcall("glTexImage2D");
     910        }
    899911    }
    900912
     
    10011013    IWineD3DBaseTexture *baseTexture = NULL;
    10021014
    1003 #ifdef VBOXWDDM
    1004     if (VBOXSHRC_IS_SHARED(This))
    1005     {
    1006         if (!VBOXSHRC_IS_SHARED_OPENED(This))
    1007             IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INTEXTURE, NULL);
    1008         else
    1009             This->Flags |= SFLAG_INTEXTURE;
    1010     }
    1011     else
    1012 #endif
    1013     {
    1014         if (!(This->Flags & SFLAG_INSYSMEM) && (This->Flags & SFLAG_INTEXTURE))
    1015             IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL /* no partial locking for textures yet */);
    1016 
    1017         IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE);
    1018     }
     1015    if (!(This->Flags & SFLAG_INSYSMEM) && (This->Flags & SFLAG_INTEXTURE))
     1016        IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL /* no partial locking for textures yet */);
     1017
     1018    IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE);
    10191019
    10201020    if (dirty_rect)
     
    39823982}
    39833983
     3984#ifdef VBOXWDDM
     3985static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, DWORD flag, const RECT *rect);
     3986#endif
     3987
    39843988static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
    39853989    /** Check against the maximum texture sizes supported by the video card **/
     
    40664070    }
    40674071
    4068 #ifdef VBOXWDDM
    4069     if (!VBOXSHRC_IS_SHARED(This))
    4070 #endif
    4071     {
    4072         This->Flags |= SFLAG_INSYSMEM;
    4073     }
     4072    This->Flags |= SFLAG_INSYSMEM;
    40744073
    40754074    return WINED3D_OK;
     
    42814280        if(((This->Flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) ||
    42824281           ((This->Flags & SFLAG_INSRGBTEX) && !(flag & SFLAG_INSRGBTEX))) {
     4282#ifdef VBOXWDDM
     4283            if (VBOXSHRC_IS_SHARED(This))
     4284            {
     4285                IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INTEXTURE, NULL);
     4286            }
     4287            else
     4288#endif
    42834289            if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) {
    42844290                TRACE("Passing to container\n");
     
    42984304    } else {
    42994305        if((This->Flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX))) {
     4306#ifdef VBOXWDDM
     4307            if (VBOXSHRC_IS_SHARED(This))
     4308            {
     4309                IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INTEXTURE, NULL);
     4310            }
     4311            else
     4312#endif
    43004313            if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) {
    43014314                TRACE("Passing to container\n");
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