VirtualBox

Ignore:
Timestamp:
Aug 27, 2009 8:57:47 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: update wine to 1.1.27 and better fix for depthstencil surface refcounting

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_private.h

    r21731 r22496  
    107107    _pD3D8Caps->MaxPixelShaderValue               = _pWineCaps->PixelShader1xMaxValue;
    108108
     109void fixup_caps(WINED3DCAPS *pWineCaps);
     110
    109111/* Direct3D8 Interfaces: */
    110112typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/device.c

    r21731 r22496  
    404404    hrc = IWineD3DDevice_GetDeviceCaps(This->WineD3DDevice, pWineCaps);
    405405    LeaveCriticalSection(&d3d8_cs);
     406    fixup_caps(pWineCaps);
    406407    WINECAPSTOD3D8CAPS(pCaps, pWineCaps)
    407408    HeapFree(GetProcessHeap(), 0, pWineCaps);
    408 
    409     /* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
    410     if(pCaps->PixelShaderVersion > D3DPS_VERSION(1,4)){
    411         pCaps->PixelShaderVersion = D3DPS_VERSION(1,4);
    412     }
    413     if(pCaps->VertexShaderVersion > D3DVS_VERSION(1,1)){
    414         pCaps->VertexShaderVersion = D3DVS_VERSION(1,1);
    415     }
    416     pCaps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);
    417409
    418410    TRACE("Returning %p %p\n", This, pCaps);
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/directx.c

    r21731 r22496  
    205205    TRACE("(%p)->(%d, %d, %d, %08x, %d, %d)\n", This, Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
    206206
     207    if(CheckFormat == D3DFMT_R8G8B8)
     208    {
     209        /* See comment in dlls/d3d9/directx.c, IDirect3D9Impl_CheckDeviceFormat for details */
     210        WARN("D3DFMT_R8G8B8 is not available on windows, returning D3DERR_NOTAVAILABLE\n");
     211        return D3DERR_NOTAVAILABLE;
     212    }
     213
     214
    207215    switch(RType) {
    208216        case D3DRTYPE_VERTEXBUFFER:
     
    252260}
    253261
     262void fixup_caps(WINED3DCAPS *caps)
     263{
     264    /* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
     265    if (caps->PixelShaderVersion > D3DPS_VERSION(1,4)) {
     266        caps->PixelShaderVersion = D3DPS_VERSION(1,4);
     267    }
     268    if (caps->VertexShaderVersion > D3DVS_VERSION(1,1)) {
     269        caps->VertexShaderVersion = D3DVS_VERSION(1,1);
     270    }
     271    caps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, caps->MaxVertexShaderConst);
     272
     273    caps->StencilCaps &= ~WINED3DSTENCILCAPS_TWOSIDED;
     274}
     275
    254276static HRESULT  WINAPI  IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps) {
    255277    IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
     
    269291    hrc = IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, pWineCaps);
    270292    LeaveCriticalSection(&d3d8_cs);
     293    fixup_caps(pWineCaps);
    271294    WINECAPSTOD3D8CAPS(pCaps, pWineCaps)
    272295    HeapFree(GetProcessHeap(), 0, pWineCaps);
    273 
    274     /* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
    275     if(pCaps->PixelShaderVersion > D3DPS_VERSION(1,4)){
    276         pCaps->PixelShaderVersion = D3DPS_VERSION(1,4);
    277     }
    278     if(pCaps->VertexShaderVersion > D3DVS_VERSION(1,1)){
    279         pCaps->VertexShaderVersion = D3DVS_VERSION(1,1);
    280     }
    281     pCaps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);
    282296
    283297    TRACE("(%p) returning %p\n", This, pCaps);
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/version.rc

    r21731 r22496  
    3535 */
    3636
     37/*
     38 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
     39 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
     40 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
     41 * a choice of LGPL license versions is made available with the language indicating
     42 * that LGPLv2 or any later version may be used, or where a choice of which version
     43 * of the LGPL is applied is otherwise unspecified.
     44 */
     45
    3746#define WINE_FILEDESCRIPTION_STR "Wine Direct3D"
    3847#define WINE_FILENAME_STR "d3d8.dll"
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