VirtualBox

Changeset 42285 in vbox


Ignore:
Timestamp:
Jul 20, 2012 4:52:34 PM (12 years ago)
Author:
vboxsync
Message:

wine/wddm: basics for non-sinchronized wined3d

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp

    r40388 r42285  
    3636    pD3D->hD3DLib = LoadLibraryW(L"VBoxD3D9wddm.dll");
    3737#endif
    38     Assert(pD3D->hD3DLib);
    3938    if (!pD3D->hD3DLib)
    4039    {
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/include/wine/wined3d.h

    r40388 r42285  
    21172117} WINED3DDISPLAYMODE;
    21182118typedef enum _WINED3DSCANLINEORDERING {
    2119   WINED3DSCANLINEORDERING_UNKNOWN    = 0, 
     2119  WINED3DSCANLINEORDERING_UNKNOWN    = 0,
    21202120  WINED3DSCANLINEORDERING_PROGRESSIVE   = 1,
    2121   WINED3DSCANLINEORDERING_INTERLACED    = 2 
     2121  WINED3DSCANLINEORDERING_INTERLACED    = 2
    21222122} WINED3DSCANLINEORDERING;
    21232123typedef struct _WINED3DDISPLAYMODEEX {
     
    21332133  WINED3DDISPLAYROTATION_90         = 2,
    21342134  WINED3DDISPLAYROTATION_180        = 3,
    2135   WINED3DDISPLAYROTATION_270        = 4 
     2135  WINED3DDISPLAYROTATION_270        = 4
    21362136} WINED3DDISPLAYROTATION;
    21372137typedef struct _WINED3DCOLORVALUE {
     
    96279627IWineD3DClipper * STDMETHODCALLTYPE  WineDirect3DCreateClipper(IUnknown *parent);
    96289628
     9629#ifdef VBOX_WINE_NO_LOCK
     9630#define wined3d_mutex_lock() do {} while (0)
     9631#define wined3d_mutex_unlock() do {} while (0)
     9632#else
    96299633void STDMETHODCALLTYPE  wined3d_mutex_lock(void);
    96309634
    96319635void STDMETHODCALLTYPE  wined3d_mutex_unlock(void);
    9632 
     9636#endif
    96339637/* Begin additional prototypes for all interfaces */
    96349638
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c

    r41929 r42285  
    12231223        return;
    12241224
    1225     /* there is a currently assigned context,
    1226      * 2. now increase its ref count to ensure its dtor routine is not called while making set_current(NULL).
    1227      * This is needed since dtor can only be run with a wined3d lock held */
    1228     VBoxTlsRefAddRef(old);
     1225//    /* there is a currently assigned context,
     1226//     * 2. now increase its ref count to ensure its dtor routine is not called while making set_current(NULL).
     1227//     * This is needed since dtor can only be run with a wined3d lock held */
     1228//    VBoxTlsRefAddRef(old);
     1229
     1230    /* context_tls_dtor now does only memfree, so just call it right away */
    12291231
    12301232    /* 3. now we can call context_set_current(NULL) */
    12311233    context_set_current(NULL);
    12321234
    1233     /* 4. to avoid possible deadlocks we make an asynchronous call to a worker thread to make
    1234      * wined3d lock - context release - wined3d unlock from there. */
    1235     VBoxExtReleaseContextAsync(old);
     1235//    /* 4. to avoid possible deadlocks we make an asynchronous call to a worker thread to make
     1236//     * wined3d lock - context release - wined3d unlock from there. */
     1237//    VBoxExtReleaseContextAsync(old);
    12361238}
    12371239#endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c

    r41818 r42285  
    20572057
    20582058static UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *iface) {
     2059#ifndef VBOX_WITH_WDDM
    20592060    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
    20602061
     
    20642065    /* return simulated texture memory left */
    20652066    return (This->adapter->TextureRam - This->adapter->UsedTextureRam);
     2067#else
     2068    ERR("Should not be here!");
     2069    return 0;
     2070#endif
    20662071}
    20672072
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c

    r42154 r42285  
    336336}
    337337
     338#ifndef VBOX_WITH_WDDM
    338339/* Adjust the amount of used texture memory */
    339340long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram)
     
    345346    return adapter->UsedTextureRam;
    346347}
     348#endif
    347349
    348350static void wined3d_adapter_cleanup(struct wined3d_adapter *adapter)
     
    29762978}
    29772979
    2978 static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayModeEx(IWineD3D *iface, 
     2980static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayModeEx(IWineD3D *iface,
    29792981        UINT Adapter, WINED3DDISPLAYMODEEX *pMode, WINED3DDISPLAYROTATION *pRotation)
    29802982{
     
    30773079static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, DWORD Flags,
    30783080                                                   WINED3DADAPTER_IDENTIFIER* pIdentifier) {
     3081#ifdef VBOX_WITH_WDDM
     3082    ERR("Should not be here!");
     3083    return WINED3DERR_INVALIDCALL;
     3084#else
    30793085    IWineD3DImpl *This = (IWineD3DImpl *)iface;
    30803086    struct wined3d_adapter *adapter;
     
    31363142
    31373143    return WINED3D_OK;
     3144#endif
    31383145}
    31393146
     
    54195426
    54205427        hdc = fake_gl_ctx.dc;
    5421 
     5428#ifndef VBOX_WITH_WDDM
    54225429        /* Use the VideoRamSize registry setting when set */
    54235430        if(wined3d_settings.emulated_textureram)
     
    54275434        adapter->UsedTextureRam = 0;
    54285435        TRACE("Emulating %dMB of texture ram\n", adapter->TextureRam/(1024*1024));
    5429 
     5436#endif
    54305437        /* Initialize the Adapter's DeviceName which is required for ChangeDisplaySettings and friends */
    54315438        DisplayDevice.cb = sizeof(DisplayDevice);
     
    56005607    This->adapters[0].driver_info.name = "Display";
    56015608    This->adapters[0].driver_info.description = "WineD3D DirectDraw Emulation";
     5609#ifndef VBOX_WITH_WDDM
    56025610    if(wined3d_settings.emulated_textureram) {
    56035611        This->adapters[0].TextureRam = wined3d_settings.emulated_textureram;
     
    56055613        This->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */
    56065614    }
    5607 
     5615#endif
    56085616    initPixelFormatsNoGL(&This->adapters[0].gl_info);
    56095617
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/resource.c

    r41109 r42285  
    9797    }
    9898
     99#ifndef VBOX_WITH_WDDM
    99100    /* Check that we have enough video ram left */
    100101    if (pool == WINED3DPOOL_DEFAULT)
    101102    {
    102 #ifndef VBOX_WITH_WDDM
    103103        if (size > IWineD3DDevice_GetAvailableTextureMem((IWineD3DDevice *)device))
    104104        {
     
    107107            return WINED3DERR_OUTOFVIDEOMEMORY;
    108108        }
    109 #endif
    110109        WineD3DAdapterChangeGLRam(device, size);
    111110    }
     111#endif
    112112
    113113    device_resource_add(device, iface);
     
    124124
    125125    TRACE("(%p) Cleaning up resource\n", This);
     126#ifndef VBOX_WITH_WDDM
    126127    if (This->resource.pool == WINED3DPOOL_DEFAULT) {
    127128        TRACE("Decrementing device memory pool by %u\n", This->resource.size);
    128129        WineD3DAdapterChangeGLRam(This->resource.device, -This->resource.size);
    129130    }
     131#endif
    130132
    131133    LIST_FOR_EACH_SAFE(e1, e2, &This->resource.privateData) {
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h

    r41109 r42285  
    15471547    WineD3D_PixelFormat     *cfgs;
    15481548    BOOL                    brokenStencil; /* Set on cards which only offer mixed depth+stencil */
     1549#ifndef VBOX_WITH_WDDM
    15491550    unsigned int            TextureRam; /* Amount of texture memory both video ram + AGP/TurboCache/HyperMemory/.. */
    15501551    unsigned int            UsedTextureRam;
     1552#endif
    15511553    LUID luid;
    15521554
     
    15581560BOOL initPixelFormats(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) DECLSPEC_HIDDEN;
    15591561BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
     1562#ifndef VBOX_WITH_WDDM
    15601563extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram) DECLSPEC_HIDDEN;
     1564#endif
    15611565extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
    15621566
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