VirtualBox

Changeset 29966 in vbox for trunk/src


Ignore:
Timestamp:
Jun 1, 2010 11:47:38 PM (15 years ago)
Author:
vboxsync
Message:

wddm/3d: add missing caps

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp

    r29895 r29966  
    10681068        {
    10691069            Assert(pData->DataSize >= sizeof (D3DCAPS9));
     1070//            AssertBreakpoint();
    10701071            if (pData->DataSize >= sizeof (D3DCAPS9))
    10711072            {
    10721073                if (pAdapter->pD3D9If)
    10731074                {
    1074                     hr = pAdapter->pD3D9If->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, (D3DCAPS9*)pData->pData);
     1075                    D3DCAPS9* pCaps = (D3DCAPS9*)pData->pData;
     1076                    hr = pAdapter->pD3D9If->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pCaps);
    10751077                    Assert(hr == S_OK);
    10761078                    if (hr == S_OK)
     1079                    {
     1080                        pCaps->Caps2 |= D3DCAPS2_CANSHARERESOURCE | 0x00080000 /*D3DCAPS2_CANRENDERWINDOWED*/;
     1081                        pCaps->DevCaps |= D3DDEVCAPS_FLOATTLVERTEX /* <- must be set according to the docs */
     1082                                /*| D3DDEVCAPS_HWVERTEXBUFFER | D3DDEVCAPS_HWINDEXBUFFER |  D3DDEVCAPS_SUBVOLUMELOCK */;
     1083                        pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_INDEPENDENTWRITEMASKS
     1084                                | D3DPMISCCAPS_FOGINFVF
     1085                                | D3DPMISCCAPS_SEPARATEALPHABLEND | D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS;
     1086                        pCaps->RasterCaps |= D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_STIPPLE | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_COLORPERSPECTIVE /* keep */;
     1087                        pCaps->TextureCaps |= D3DPTEXTURECAPS_TRANSPARENCY | D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE;
     1088                        pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE;
     1089                        pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE;
     1090                        pCaps->GuardBandLeft = -8192.;
     1091                        pCaps->GuardBandTop = -8192.;
     1092                        pCaps->GuardBandRight = 8192.;
     1093                        pCaps->GuardBandBottom = 8192.;
     1094                        pCaps->StencilCaps |= D3DSTENCILCAPS_TWOSIDED;
     1095                        pCaps->DeclTypes |= D3DDTCAPS_FLOAT16_2 | D3DDTCAPS_FLOAT16_4;
     1096                        pCaps->VS20Caps.DynamicFlowControlDepth = 24;
     1097                        pCaps->VS20Caps.NumTemps = D3DVS20_MAX_NUMTEMPS;
     1098                        pCaps->PS20Caps.DynamicFlowControlDepth = 24;
     1099                        pCaps->PS20Caps.NumTemps = D3DVS20_MAX_NUMTEMPS;
     1100                        pCaps->VertexTextureFilterCaps |= D3DPTFILTERCAPS_MINFPOINT | D3DPTFILTERCAPS_MAGFPOINT;
     1101                        pCaps->MaxVertexShader30InstructionSlots = 512;
     1102                        pCaps->MaxPixelShader30InstructionSlots = 512;
    10771103                        break;
     1104                    }
    10781105
    10791106                    vboxVDbgPrintR((__FUNCTION__": GetDeviceCaps hr(%d)\n", hr));
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoIf.h

    r29895 r29966  
    154154        case D3DDDIFMT_P8:
    155155            return 8;
     156        case D3DDDIFMT_D16_LOCKABLE:
     157        case D3DDDIFMT_D16:
     158        case D3DDDIFMT_D15S1:
     159            return 16;
     160        case D3DDDIFMT_D32:
     161        case D3DDDIFMT_D24S8:
     162        case D3DDDIFMT_D24X8:
     163        case D3DDDIFMT_D24X4S4:
     164        case D3DDDIFMT_D24FS8:
     165        case D3DDDIFMT_D32_LOCKABLE:
     166            return 32;
     167        case D3DDDIFMT_S8_LOCKABLE:
     168            return 8;
    156169        default:
    157170            AssertBreakpoint();
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVhwa.cpp

    r29928 r29966  
    561561        pSurf->SurfDesc.pitch = pInfo->pitch;
    562562        Assert(pSurf->SurfDesc.pitch);
     563        /* @todo: make this properly */
     564        pSurf->SurfDesc.bpp = (pSurf->SurfDesc.cbSize * 8) / pSurf->SurfDesc.height / pSurf->SurfDesc.pitch;
     565        Assert(pSurf->SurfDesc.bpp);
    563566    }
    564567    else
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