VirtualBox

Ignore:
Timestamp:
Jul 21, 2009 9:16:52 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50306
Message:

crOpenGL: update to wine 1.1.26

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/cubetexture.c

    r19678 r21731  
    242242static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 iface, UINT Level, D3DSURFACE_DESC* pDesc) {
    243243    IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
    244     WINED3DSURFACE_DESC    wined3ddesc;
    245     UINT                   tmpInt = -1;
    246     WINED3DFORMAT format;
    247     HRESULT hr;
    248 
    249     TRACE("(%p) Relay\n", This);
    250 
    251     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
    252     wined3ddesc.Format              = &format;
    253     wined3ddesc.Type                = (WINED3DRESOURCETYPE *) &pDesc->Type;
    254     wined3ddesc.Usage               = &pDesc->Usage;
    255     wined3ddesc.Pool                = (WINED3DPOOL *) &pDesc->Pool;
    256     wined3ddesc.Size                = &tmpInt;
    257     wined3ddesc.MultiSampleType     = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
    258     wined3ddesc.MultiSampleQuality  = &pDesc->MultiSampleQuality;
    259     wined3ddesc.Width               = &pDesc->Width;
    260     wined3ddesc.Height              = &pDesc->Height;
     244    WINED3DSURFACE_DESC wined3ddesc;
     245    HRESULT hr;
     246
     247    TRACE("(%p) Relay\n", This);
    261248
    262249    EnterCriticalSection(&d3d9_cs);
     
    264251    LeaveCriticalSection(&d3d9_cs);
    265252
    266     if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
     253    if (SUCCEEDED(hr))
     254    {
     255        pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format);
     256        pDesc->Type = wined3ddesc.resource_type;
     257        pDesc->Usage = wined3ddesc.usage;
     258        pDesc->Pool = wined3ddesc.pool;
     259        pDesc->MultiSampleType = wined3ddesc.multisample_type;
     260        pDesc->MultiSampleQuality = wined3ddesc.multisample_quality;
     261        pDesc->Width = wined3ddesc.width;
     262        pDesc->Height = wined3ddesc.height;
     263    }
    267264
    268265    return hr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c

    r20612 r21731  
    434434static HRESULT WINAPI reset_enum_callback(IWineD3DResource *resource, void *data) {
    435435    BOOL *resources_ok = data;
    436     WINED3DRESOURCETYPE type;
     436    D3DRESOURCETYPE type;
    437437    HRESULT ret = S_OK;
    438438    WINED3DSURFACE_DESC surface_desc;
     
    440440    D3DINDEXBUFFER_DESC index_desc;
    441441    D3DVERTEXBUFFER_DESC vertex_desc;
    442     WINED3DFORMAT dummy_format;
    443     WINED3DMULTISAMPLE_TYPE dummy_multisampletype;
    444     DWORD dummy_dword;
    445     WINED3DPOOL pool = WINED3DPOOL_SCRATCH; /* a harmless pool */
     442    WINED3DPOOL pool;
    446443    IDirect3DResource9 *parent;
    447444
     
    450447    switch(type) {
    451448        case D3DRTYPE_SURFACE:
    452             surface_desc.Format = &dummy_format;
    453             surface_desc.Type = &type;
    454             surface_desc.Usage = &dummy_dword;
    455             surface_desc.Pool = &pool;
    456             surface_desc.Size = &dummy_dword;
    457             surface_desc.MultiSampleType = &dummy_multisampletype;
    458             surface_desc.MultiSampleQuality = &dummy_dword;
    459             surface_desc.Width = &dummy_dword;
    460             surface_desc.Height = &dummy_dword;
    461 
    462449            IWineD3DSurface_GetDesc((IWineD3DSurface *) resource, &surface_desc);
     450            pool = surface_desc.pool;
    463451            break;
    464452
    465453        case D3DRTYPE_VOLUME:
    466             volume_desc.Format = &dummy_format;
    467             volume_desc.Type = &type;
    468             volume_desc.Usage = &dummy_dword;
    469             volume_desc.Pool = &pool;
    470             volume_desc.Size = &dummy_dword;
    471             volume_desc.Width = &dummy_dword;
    472             volume_desc.Height = &dummy_dword;
    473             volume_desc.Depth = &dummy_dword;
    474454            IWineD3DVolume_GetDesc((IWineD3DVolume *) resource, &volume_desc);
     455            pool = volume_desc.Pool;
    475456            break;
    476457
     
    489470         */
    490471        default:
     472            pool = WINED3DPOOL_SCRATCH; /* a harmless pool */
    491473            break;
    492474    }
     
    657639
    658640
    659 static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface,D3DRESOURCETYPE Type, UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality,HANDLE* pSharedHandle )  {
     641static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height,
     642        D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface,
     643        UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality)
     644{
    660645    HRESULT hrc;
    661646    IDirect3DSurface9Impl *object;
     
    688673    EnterCriticalSection(&d3d9_cs);
    689674    hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, wined3dformat_from_d3dformat(Format),
    690             Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK,
    691             (WINED3DPOOL)Pool, MultiSample, MultisampleQuality, SURFACE_OPENGL, (IUnknown *)object);
     675            Lockable, Discard, Level, &object->wineD3DSurface, Usage & WINED3DUSAGE_MASK, (WINED3DPOOL)Pool,
     676            MultiSample, MultisampleQuality, SURFACE_OPENGL, (IUnknown *)object);
    692677    LeaveCriticalSection(&d3d9_cs);
    693678
     
    715700    TRACE("Relay\n");
    716701
    717    hr = IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,Lockable,FALSE/*Discard*/, 0/*Level*/, ppSurface,D3DRTYPE_SURFACE,D3DUSAGE_RENDERTARGET,D3DPOOL_DEFAULT,MultiSample,MultisampleQuality,pSharedHandle);
    718    return hr;
     702    hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, Lockable, FALSE /* Discard */,
     703            0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality);
     704
     705    return hr;
    719706}
    720707
     
    726713    TRACE("Relay\n");
    727714
    728      hr = IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,TRUE/* Lockable */,Discard, 0/* Level */
    729                                                ,ppSurface,D3DRTYPE_SURFACE,D3DUSAGE_DEPTHSTENCIL,
    730                                                 D3DPOOL_DEFAULT,MultiSample,MultisampleQuality,pSharedHandle);
    731      return hr;
     715    hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, Discard,
     716            0 /* Level */, ppSurface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality);
     717
     718    return hr;
    732719}
    733720
     
    803790    TRACE("(%p) Relay\n" , This);
    804791
    805     memset(&desc, 0, sizeof(desc));
    806     desc.Usage = &usage;
    807     desc.Pool = &pool;
    808     desc.Type = &restype;
    809 
    810792    EnterCriticalSection(&d3d9_cs);
    811793    IWineD3DSurface_GetDesc(surface->wineD3DSurface, &desc);
     794    usage = desc.usage;
     795    pool = desc.pool;
     796    restype = desc.resource_type;
    812797
    813798    /* This method is only allowed with surfaces that are render targets, or offscreen plain surfaces
    814799     * in D3DPOOL_DEFAULT
    815800     */
    816     if(!(usage & WINED3DUSAGE_RENDERTARGET) && (pool != D3DPOOL_DEFAULT || restype != D3DRTYPE_SURFACE)) {
     801    if(!(usage & WINED3DUSAGE_RENDERTARGET) && (pool != WINED3DPOOL_DEFAULT || restype != WINED3DRTYPE_SURFACE)) {
    817802        LeaveCriticalSection(&d3d9_cs);
    818803        WARN("Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface\n");
     
    841826        should I change the usage to dynamic?       
    842827        */
    843     hr = IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,TRUE/*Loackable*/,FALSE/*Discard*/,0/*Level*/ , ppSurface,D3DRTYPE_SURFACE, 0/*Usage (undefined/none)*/,(WINED3DPOOL) Pool,D3DMULTISAMPLE_NONE,0/*MultisampleQuality*/,pSharedHandle);
     828    hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, FALSE /* Discard */,
     829            0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, (WINED3DPOOL)Pool, D3DMULTISAMPLE_NONE,
     830            0 /* MultisampleQuality */);
    844831
    845832    return hr;
     
    20172004    hr = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9Ex *)This, width, height,
    20182005            d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level,
    2019             (IDirect3DSurface9 **)&d3d_surface, D3DRTYPE_SURFACE, usage, pool,
    2020             D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */, NULL);
     2006            (IDirect3DSurface9 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */);
    20212007    if (FAILED(hr))
    20222008    {
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c

    r19678 r21731  
    116116    HRESULT hr;
    117117
    118     /* dx8 and dx9 have different structures to be filled in, with incompatible
    119        layouts so pass in pointers to the places to be filled via an internal
    120        structure                                                                */
    121     adapter_id.Driver           = pIdentifier->Driver;         
    122     adapter_id.Description      = pIdentifier->Description;     
    123     adapter_id.DeviceName       = pIdentifier->DeviceName;     
    124     adapter_id.DriverVersion    = &pIdentifier->DriverVersion;   
    125     adapter_id.VendorId         = &pIdentifier->VendorId;       
    126     adapter_id.DeviceId         = &pIdentifier->DeviceId;       
    127     adapter_id.SubSysId         = &pIdentifier->SubSysId;       
    128     adapter_id.Revision         = &pIdentifier->Revision;       
    129     adapter_id.DeviceIdentifier = &pIdentifier->DeviceIdentifier;
    130     adapter_id.WHQLLevel        = &pIdentifier->WHQLLevel;       
     118    adapter_id.driver = pIdentifier->Driver;
     119    adapter_id.driver_size = sizeof(pIdentifier->Driver);
     120    adapter_id.description = pIdentifier->Description;
     121    adapter_id.description_size = sizeof(pIdentifier->Description);
     122    adapter_id.device_name = pIdentifier->DeviceName;
     123    adapter_id.device_name_size = sizeof(pIdentifier->DeviceName);
    131124
    132125    EnterCriticalSection(&d3d9_cs);
    133126    hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, Adapter, Flags, &adapter_id);
    134127    LeaveCriticalSection(&d3d9_cs);
     128
     129    pIdentifier->DriverVersion = adapter_id.driver_version;
     130    pIdentifier->VendorId = adapter_id.vendor_id;
     131    pIdentifier->DeviceId = adapter_id.device_id;
     132    pIdentifier->SubSysId = adapter_id.subsystem_id;
     133    pIdentifier->Revision = adapter_id.revision;
     134    memcpy(&pIdentifier->DeviceIdentifier, &adapter_id.device_identifier, sizeof(pIdentifier->DeviceIdentifier));
     135    pIdentifier->WHQLLevel = adapter_id.whql_level;
     136
    135137    return hr;
    136138}
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/surface.c

    r19678 r21731  
    215215static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFACE_DESC* pDesc) {
    216216    IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
    217     WINED3DSURFACE_DESC    wined3ddesc;
    218     UINT                   tmpInt = -1;
    219     WINED3DFORMAT format;
    220     HRESULT hr;
    221     TRACE("(%p) Relay\n", This);
    222 
    223     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
    224     wined3ddesc.Format              = &format;
    225     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
    226     wined3ddesc.Usage               = &pDesc->Usage;
    227     wined3ddesc.Pool                = (WINED3DPOOL *) &pDesc->Pool;
    228     wined3ddesc.Size                = &tmpInt;
    229     wined3ddesc.MultiSampleType     = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
    230     wined3ddesc.MultiSampleQuality  = &pDesc->MultiSampleQuality;
    231     wined3ddesc.Width               = &pDesc->Width;
    232     wined3ddesc.Height              = &pDesc->Height;
     217    WINED3DSURFACE_DESC wined3ddesc;
     218    HRESULT hr;
     219    TRACE("(%p) Relay\n", This);
    233220
    234221    EnterCriticalSection(&d3d9_cs);
     
    236223    LeaveCriticalSection(&d3d9_cs);
    237224
    238     if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
     225    if (SUCCEEDED(hr))
     226    {
     227        pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format);
     228        pDesc->Type = wined3ddesc.resource_type;
     229        pDesc->Usage = wined3ddesc.usage;
     230        pDesc->Pool = wined3ddesc.pool;
     231        pDesc->MultiSampleType = wined3ddesc.multisample_type;
     232        pDesc->MultiSampleQuality = wined3ddesc.multisample_quality;
     233        pDesc->Width = wined3ddesc.width;
     234        pDesc->Height = wined3ddesc.height;
     235    }
    239236
    240237    return hr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/texture.c

    r19678 r21731  
    239239static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT Level, D3DSURFACE_DESC* pDesc) {
    240240    IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface;
    241 
    242     WINED3DSURFACE_DESC    wined3ddesc;
    243     UINT                   tmpInt = -1;
    244     HRESULT                hr;
    245     WINED3DFORMAT format;
    246 
    247     TRACE("(%p) Relay\n", This);
    248 
    249     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
    250     wined3ddesc.Format              = &format;
    251     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
    252     wined3ddesc.Usage               = &pDesc->Usage;
    253     wined3ddesc.Pool                = (WINED3DPOOL *) &pDesc->Pool;
    254     wined3ddesc.Size                = &tmpInt; /* required for d3d8 */
    255     wined3ddesc.MultiSampleType     = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
    256     wined3ddesc.MultiSampleQuality  = &pDesc->MultiSampleQuality;
    257     wined3ddesc.Width               = &pDesc->Width;
    258     wined3ddesc.Height              = &pDesc->Height;
     241    WINED3DSURFACE_DESC wined3ddesc;
     242    HRESULT hr;
     243
     244    TRACE("(%p) Relay\n", This);
    259245
    260246    EnterCriticalSection(&d3d9_cs);
     
    262248    LeaveCriticalSection(&d3d9_cs);
    263249
    264     if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
     250    if (SUCCEEDED(hr))
     251    {
     252        pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format);
     253        pDesc->Type = wined3ddesc.resource_type;
     254        pDesc->Usage = wined3ddesc.usage;
     255        pDesc->Pool = wined3ddesc.pool;
     256        pDesc->MultiSampleType = wined3ddesc.multisample_type;
     257        pDesc->MultiSampleQuality = wined3ddesc.multisample_quality;
     258        pDesc->Width = wined3ddesc.width;
     259        pDesc->Height = wined3ddesc.height;
     260    }
    265261
    266262    return hr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/version.rc

    r16477 r21731  
    2626 */
    2727
     28/*
     29 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
     30 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
     31 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
     32 * a choice of LGPL license versions is made available with the language indicating
     33 * that LGPLv2 or any later version may be used, or where a choice of which version
     34 * of the LGPL is applied is otherwise unspecified.
     35 */
     36
    2837#define WINE_FILEDESCRIPTION_STR "Wine Direct3D"
    2938#define WINE_FILENAME_STR "d3d9.dll"
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volume.c

    r19678 r21731  
    177177    IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
    178178    WINED3DVOLUME_DESC     wined3ddesc;
    179     UINT                   tmpInt = -1;
    180     WINED3DFORMAT format;
    181     HRESULT hr;
    182 
    183     TRACE("(%p) Relay\n", This);
    184 
    185     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
    186     wined3ddesc.Format              = &format;
    187     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
    188     wined3ddesc.Usage               = &pDesc->Usage;
    189     wined3ddesc.Pool                = (WINED3DPOOL *) &pDesc->Pool;
    190     wined3ddesc.Size                = &tmpInt;
    191     wined3ddesc.Width               = &pDesc->Width;
    192     wined3ddesc.Height              = &pDesc->Height;
    193     wined3ddesc.Depth               = &pDesc->Depth;
     179    HRESULT hr;
     180
     181    TRACE("(%p) Relay\n", This);
    194182
    195183    EnterCriticalSection(&d3d9_cs);
     
    199187    LeaveCriticalSection(&d3d9_cs);
    200188
    201     if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
     189    if (SUCCEEDED(hr))
     190    {
     191        pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.Format);
     192        pDesc->Type = wined3ddesc.Type;
     193        pDesc->Usage = wined3ddesc.Usage;
     194        pDesc->Pool = wined3ddesc.Pool;
     195        pDesc->Width = wined3ddesc.Width;
     196        pDesc->Height = wined3ddesc.Height;
     197        pDesc->Depth = wined3ddesc.Depth;
     198    }
    202199
    203200    return hr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volumetexture.c

    r19678 r21731  
    291291    IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
    292292    WINED3DVOLUME_DESC     wined3ddesc;
    293     UINT                   tmpInt = -1;
    294     WINED3DFORMAT format;
    295     HRESULT hr;
    296 
    297     TRACE("(%p) Relay\n", This);
    298 
    299     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
    300     wined3ddesc.Format              = &format;
    301     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
    302     wined3ddesc.Usage               = &pDesc->Usage;
    303     wined3ddesc.Pool                = (WINED3DPOOL *) &pDesc->Pool;
    304     wined3ddesc.Size                = &tmpInt;
    305     wined3ddesc.Width               = &pDesc->Width;
    306     wined3ddesc.Height              = &pDesc->Height;
    307     wined3ddesc.Depth               = &pDesc->Depth;
     293    HRESULT hr;
     294
     295    TRACE("(%p) Relay\n", This);
    308296
    309297    EnterCriticalSection(&d3d9_cs);
     
    313301    LeaveCriticalSection(&d3d9_cs);
    314302
    315     if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
     303    if (SUCCEEDED(hr))
     304    {
     305        pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.Format);
     306        pDesc->Type = wined3ddesc.Type;
     307        pDesc->Usage = wined3ddesc.Usage;
     308        pDesc->Pool = wined3ddesc.Pool;
     309        pDesc->Width = wined3ddesc.Width;
     310        pDesc->Height = wined3ddesc.Height;
     311        pDesc->Depth = wined3ddesc.Depth;
     312    }
    316313
    317314    return hr;
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