VirtualBox

Changeset 43607 in vbox for trunk


Ignore:
Timestamp:
Oct 11, 2012 7:09:51 AM (12 years ago)
Author:
vboxsync
Message:

wddm/3d: d3d width in SurfDesc to make it properly propagated to OpenResource

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h

    r43360 r43607  
    3535
    3636/* One would increase this whenever definitions in this file are changed */
    37 #define VBOXVIDEOIF_VERSION 13
     37#define VBOXVIDEOIF_VERSION 14
    3838
    3939#define VBOXWDDM_NODE_ID_SYSTEM           0
     
    9292    UINT depth;
    9393    UINT slicePitch;
     94    UINT d3dWidth;
    9495    UINT cbSize;
    9596    D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxD3DIf.cpp

    r43360 r43607  
    483483                {
    484484                    hr = pDevice->pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9CreateCubeTexture((IDirect3DDevice9Ex *)pDevice9If,
    485                                                 pAllocation->D3DWidth,
     485                                                pAllocation->SurfDesc.d3dWidth,
    486486                                                VBOXDISP_CUBEMAP_LEVELS_COUNT(pRc),
    487487                                                vboxDDI2D3DUsage(pRc->RcDesc.fFlags),
     
    503503            {
    504504                hr = pDevice->pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9CreateVolumeTexture((IDirect3DDevice9Ex *)pDevice9If,
    505                                             pAllocation->D3DWidth,
     505                                            pAllocation->SurfDesc.d3dWidth,
    506506                                            pAllocation->SurfDesc.height,
    507507                                            pAllocation->SurfDesc.depth,
     
    524524            {
    525525                hr = pDevice->pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9CreateTexture((IDirect3DDevice9Ex *)pDevice9If,
    526                                             pAllocation->D3DWidth,
     526                                            pAllocation->SurfDesc.d3dWidth,
    527527                                            pAllocation->SurfDesc.height,
    528528                                            pRc->cAllocations,
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp

    r43606 r43607  
    29212921    VBOXVDBG_CHECK_SMSYNC(pSrcRc);
    29222922
    2923     if (pSrcRc->aAllocations[0].D3DWidth == pDstRc->aAllocations[0].D3DWidth
     2923    if (pSrcRc->aAllocations[0].SurfDesc.d3dWidth == pDstRc->aAllocations[0].SurfDesc.d3dWidth
    29242924            && pSrcRc->aAllocations[0].SurfDesc.height == pDstRc->aAllocations[0].SurfDesc.height
    29252925            && pSrcRc->RcDesc.enmFormat == pDstRc->RcDesc.enmFormat
     
    41134113        pAllocation->iAlloc = i;
    41144114        pAllocation->pRc = pRc;
    4115         pAllocation->D3DWidth = pSurf->Width;
     4115        pAllocation->SurfDesc.d3dWidth = pSurf->Width;
    41164116        pAllocation->pvMem = (void*)pSurf->pSysMem;
    41174117        pAllocation->SurfDesc.slicePitch = pSurf->SysMemSlicePitch;
     
    41454145                {
    41464146                    Assert(pAllocation->SurfDesc.pitch > minPitch);
    4147                     pAllocation->D3DWidth = vboxWddmCalcWidthForPitch(pAllocation->SurfDesc.pitch, pAllocation->SurfDesc.format);
     4147                    pAllocation->SurfDesc.d3dWidth = vboxWddmCalcWidthForPitch(pAllocation->SurfDesc.pitch, pAllocation->SurfDesc.format);
    41484148                    Assert(VBOXWDDMDISP_IS_TEXTURE(pRc->RcDesc.fFlags) && !pRc->RcDesc.fFlags.CubeMap); /* <- tested for textures only! */
    41494149                }
    4150                 Assert(pAllocation->D3DWidth >= pAllocation->SurfDesc.width);
     4150                Assert(pAllocation->SurfDesc.d3dWidth >= pAllocation->SurfDesc.width);
    41514151            }
    41524152            else
    41534153            {
    4154                 Assert(pAllocation->D3DWidth == pAllocation->SurfDesc.width);
     4154                Assert(pAllocation->SurfDesc.d3dWidth == pAllocation->SurfDesc.width);
    41554155            }
    41564156        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h

    r43340 r43607  
    262262    struct VBOXWDDMDISP_RESOURCE *pRc;
    263263    void* pvMem;
    264     UINT D3DWidth;
    265264    /* object type is defined by enmD3DIfType enum */
    266265    IUnknown *pD3DIf;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp

    r43236 r43607  
    242242    {
    243243        UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format);
    244         vboxVDbgDoPrintDumpCmd("Surf Info", LockData.pData, pAlloc->D3DWidth, pAlloc->SurfDesc.height, bpp, pAlloc->SurfDesc.pitch);
     244        vboxVDbgDoPrintDumpCmd("Surf Info", LockData.pData, pAlloc->SurfDesc.d3dWidth, pAlloc->SurfDesc.height, bpp, pAlloc->SurfDesc.pitch);
    245245        if (pRect)
    246246        {
     
    631631        bFrontBuf = (vboxWddmSwapchainGetFb(pSwapchain)->pAlloc == pAlloc);
    632632    }
    633     vboxVDbgPrint(("%s D3DWidth(%d), width(%d), height(%d), format(%d), usage(%s), %s", pPrefix,
    634             pAlloc->D3DWidth, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, pAlloc->SurfDesc.format,
     633    vboxVDbgPrint(("%s d3dWidth(%d), width(%d), height(%d), format(%d), usage(%s), %s", pPrefix,
     634            pAlloc->SurfDesc.d3dWidth, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, pAlloc->SurfDesc.format,
    635635            bPrimary ?
    636636                    (bFrontBuf ? "Front Buffer" : "Back Buffer")
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