VirtualBox

Ignore:
Timestamp:
Sep 1, 2010 4:37:20 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65468
Message:

wine: shared render target support; wddm/d3d: aero multi-monitor fixes (still buggy)

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

Legend:

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

    r32061 r32184  
    482482        return hr;
    483483    }
     484
     485#ifdef VBOXWDDM
     486    if (VBOXSHRC_IS_SHARED(surface))
     487    {
     488        Assert(shared_handle);
     489        VBOXSHRC_SET_INITIALIZED(surface);
     490        IWineD3DSurface_LoadLocation(surface, SFLAG_INTEXTURE, NULL);
     491        if (!VBOXSHRC_IS_SHARED_OPENED(surface))
     492        {
     493            Assert(!(*shared_handle));
     494            *shared_handle = VBOXSHRC_GET_SHAREHANDLE(surface);
     495        }
     496        else
     497        {
     498            Assert(*shared_handle);
     499            Assert(*shared_handle == VBOXSHRC_GET_SHAREHANDLE(surface));
     500        }
     501    }
     502    else
     503    {
     504        Assert(!shared_handle);
     505    }
     506#endif
    484507
    485508    return hr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/texture.c

    r32061 r32184  
    590590        hr = IWineD3DDeviceParent_CreateSurface(device->device_parent, parent, tmp_w, tmp_h, format_desc->format,
    591591                usage, pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &texture->surfaces[i]
    592                 , shared_handle
     592                , NULL /* <- we first create a surface in an everage "non-shared" fashion and initialize its share properties later (see below)
     593                        * this is done this way because the surface does not have its parent (texture) setup properly
     594                        * thus we can not initialize texture at this stage */
    593595                , pvClientMem);
    594596
     
    621623        Assert(shared_handle);
    622624        VBOXSHRC_SET_INITIALIZED(texture);
     625        for (i = 0; i < texture->baseTexture.levels; ++i)
     626        {
     627            VBOXSHRC_COPY_SHAREDATA((IWineD3DSurfaceImpl*)texture->surfaces[i], texture);
     628        }
     629#ifdef DEBUG
     630        for (i = 0; i < texture->baseTexture.levels; ++i)
     631        {
     632            Assert(!((IWineD3DSurfaceImpl*)texture->surfaces[i])->texture_name);
     633        }
     634#endif
    623635        IWineD3DSurface_LoadLocation(texture->surfaces[0], SFLAG_INTEXTURE, NULL);
    624636        if (!VBOXSHRC_IS_SHARED_OPENED(texture))
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vboxsharedrc.h

    r32061 r32184  
    2525#define VBOXSHRC_SET_SHAREHANDLE(_o, _h) ((_o)->resource.sharerc_handle = (_h))
    2626#define VBOXSHRC_SET_INITIALIZED(_o) (VBOXSHRC_GET_SHAREFLAFS(_o) |= VBOXSHRC_F_INITIALIZED)
     27#define VBOXSHRC_COPY_SHAREDATA(_oDst, _oSrc) do { \
     28        VBOXSHRC_GET_SHAREFLAFS(_oDst) = VBOXSHRC_GET_SHAREFLAFS(_oSrc); \
     29        VBOXSHRC_SET_SHAREHANDLE(_oDst, VBOXSHRC_GET_SHAREFLAFS(_oSrc)); \
     30    } while (0)
     31#define VBOXSHRC_SET_SHARED(_o) (VBOXSHRC_GET_SHAREFLAFS(_o) |= VBOXSHRC_F_SHARED)
     32#define VBOXSHRC_SET_SHARED_OPENED(_o) (VBOXSHRC_GET_SHAREFLAFS(_o) |= VBOXSHRC_F_SHARED_OPENED)
    2733#define VBOXSHRC_IS_SHARED(_o) (!!(VBOXSHRC_GET_SHAREFLAFS(_o) & VBOXSHRC_F_SHARED))
    2834#define VBOXSHRC_IS_SHARED_OPENED(_o) (!!(VBOXSHRC_GET_SHAREFLAFS(_o) & VBOXSHRC_F_SHARED_OPENED))
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