VirtualBox

Changeset 43589 in vbox


Ignore:
Timestamp:
Oct 10, 2012 10:26:19 AM (12 years ago)
Author:
vboxsync
Message:

wine/update: fixes 2

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Makefile.kmk

    r41477 r43589  
    2222include $(PATH_SUB_CURRENT)/Video/Makefile.kmk
    2323ifdef VBOX_WITH_CROGL
    24  include $(PATH_SUB_CURRENT)/Wine/Makefile.kmk
     24 if !defined(VBOX_WITH_NEW_WINE) 
     25  include $(PATH_SUB_CURRENT)/Wine/Makefile.kmk
     26 else
     27  include $(PATH_SUB_CURRENT)/Wine_new/Makefile.kmk
     28 endif
    2529endif
    2630
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/Makefile.kmk

    r43236 r43589  
    105105 VBoxDispD3D_DEFS   += VBOX_WITH_CROGL
    106106endif
     107ifdef VBOX_WITH_NEW_WINE
     108 VBoxDispD3D_DEFS   += VBOX_WITH_NEW_WINE
     109endif
    107110VBoxDispD3D_INCS     = \
    108111        ../../../include \
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp

    r43490 r43589  
    108108        }
    109109
    110         pD3D->pfnVBoxWineExD3DDev9Update = (PFNVBOXWINEEXD3DDEV9_UPDATE)GetProcAddress(pD3D->hD3DLib, "VBoxWineExD3DDev9Update");
    111         if (!pD3D->pfnVBoxWineExD3DDev9Update)
    112         {
    113             WARN(("no VBoxWineExD3DDev9Update"));
    114             break;
    115         }
    116 
    117110        pD3D->pfnVBoxWineExD3DDev9Term = (PFNVBOXWINEEXD3DDEV9_TERM)GetProcAddress(pD3D->hD3DLib, "VBoxWineExD3DDev9Term");
    118111        if (!pD3D->pfnVBoxWineExD3DDev9Term)
    119112        {
    120113            WARN(("no VBoxWineExD3DDev9Term"));
    121             break;
    122         }
    123 
    124         pD3D->pfnVBoxWineExD3DRc9SetShRcState = (PFNVBOXWINEEXD3DRC9_SETSHRCSTATE)GetProcAddress(pD3D->hD3DLib, "VBoxWineExD3DRc9SetShRcState");
    125         if (!pD3D->pfnVBoxWineExD3DRc9SetShRcState)
    126         {
    127             WARN(("no VBoxWineExD3DRc9SetShRcState"));
    128114            break;
    129115        }
     
    949935}
    950936
     937
     938//#define D3DDEVCAPS_FLOATTLVERTEX        0x00000001
     939//#define D3DPMISCCAPS_FOGINFVF           0x00002000
     940//#define D3DPRASTERCAPS_SUBPIXEL         0x00000020
     941//#define D3DPRASTERCAPS_STIPPLE          0x00000200
     942//#define D3DPTEXTURECAPS_TRANSPARENCY    0x00000008
     943
    951944static HRESULT vboxWddmGetD3D9Caps(PVBOXWDDMDISP_D3D pD3D, D3DCAPS9 *pCaps)
    952945{
     
    957950        return hr;
    958951    }
     952
     953    /* needed for Windows Media Player to work properly */
     954    pCaps->Caps |= D3DCAPS_READ_SCANLINE;
     955    pCaps->Caps2 |= 0x00080000 /*D3DCAPS2_CANRENDERWINDOWED*/;
     956    pCaps->Caps2 |= D3DCAPS2_CANSHARERESOURCE;
     957    pCaps->DevCaps |= D3DDEVCAPS_FLOATTLVERTEX /* <- must be set according to the docs */
     958            /*| D3DDEVCAPS_HWVERTEXBUFFER | D3DDEVCAPS_HWINDEXBUFFER |  D3DDEVCAPS_SUBVOLUMELOCK */;
     959    pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_INDEPENDENTWRITEMASKS
     960            | D3DPMISCCAPS_FOGINFVF
     961            | D3DPMISCCAPS_SEPARATEALPHABLEND | D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS;
     962    pCaps->RasterCaps |= D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_STIPPLE | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_COLORPERSPECTIVE /* keep */;
     963    pCaps->TextureCaps |= D3DPTEXTURECAPS_TRANSPARENCY | D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE;
     964    pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE;
     965    pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE;
     966    pCaps->StencilCaps |= D3DSTENCILCAPS_TWOSIDED;
     967    pCaps->DeclTypes |= D3DDTCAPS_FLOAT16_2 | D3DDTCAPS_FLOAT16_4;
     968    pCaps->VertexTextureFilterCaps |= D3DPTFILTERCAPS_MINFPOINT | D3DPTFILTERCAPS_MAGFPOINT;
     969    pCaps->GuardBandLeft = -8192.;
     970    pCaps->GuardBandTop = -8192.;
     971    pCaps->GuardBandRight = 8192.;
     972    pCaps->GuardBandBottom = 8192.;
     973    pCaps->VS20Caps.DynamicFlowControlDepth = 24;
     974    pCaps->VS20Caps.NumTemps = D3DVS20_MAX_NUMTEMPS;
     975    pCaps->PS20Caps.DynamicFlowControlDepth = 24;
     976    pCaps->PS20Caps.NumTemps = D3DVS20_MAX_NUMTEMPS;
     977
     978    /* workaround for wine not returning InstructionSlots correctly for  shaders v3.0 */
     979    if ((pCaps->VertexShaderVersion & 0xff00) == 0x0300)
     980    {
     981        pCaps->MaxVertexShader30InstructionSlots = RT_MIN(32768, pCaps->MaxVertexShader30InstructionSlots);
     982        pCaps->MaxPixelShader30InstructionSlots = RT_MIN(32768, pCaps->MaxPixelShader30InstructionSlots);
     983    }
     984#if defined(DEBUG)
     985    if ((pCaps->VertexShaderVersion & 0xff00) == 0x0300)
     986    {
     987        Assert(pCaps->MaxVertexShader30InstructionSlots >= 512);
     988        Assert(pCaps->MaxVertexShader30InstructionSlots <= 32768);
     989        Assert(pCaps->MaxPixelShader30InstructionSlots >= 512);
     990        Assert(pCaps->MaxPixelShader30InstructionSlots <= 32768);
     991    }
     992    else if ((pCaps->VertexShaderVersion & 0xff00) == 0x0200)
     993    {
     994        Assert(pCaps->MaxVertexShader30InstructionSlots == 0);
     995        Assert(pCaps->MaxPixelShader30InstructionSlots == 0);
     996    }
     997    else
     998    {
     999        WARN(("incorect shader caps!"));
     1000    }
     1001#endif
    9591002
    9601003    vboxDispDumpD3DCAPS9(pCaps);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h

    r43490 r43589  
    4444#       undef  _interlockedbittestandreset64
    4545
     46#ifdef VBOX_WITH_NEW_WINE
     47#include "../../../Wine_new/vbox/VBoxWineEx.h"
     48#else
    4649#include "../../../Wine/vbox/VBoxWineEx.h"
     50#endif
    4751
    4852/* D3D functionality the VBOXDISPD3D provides */
     
    6771    PFNVBOXWINEEXD3DDEV9_VOLTEXBLT pfnVBoxWineExD3DDev9VolTexBlt;
    6872
    69     PFNVBOXWINEEXD3DDEV9_UPDATE pfnVBoxWineExD3DDev9Update;
    70 
    7173    PFNVBOXWINEEXD3DDEV9_TERM pfnVBoxWineExD3DDev9Term;
    72 
    73     PFNVBOXWINEEXD3DRC9_SETSHRCSTATE pfnVBoxWineExD3DRc9SetShRcState;
    7474
    7575    PFNVBOXWINEEXD3DSWAPCHAIN9_PRESENT pfnVBoxWineExD3DSwapchain9Present;
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