VirtualBox

Changeset 27286 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Mar 11, 2010 4:01:26 PM (15 years ago)
Author:
vboxsync
Message:

wddm: bugfix

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.cpp

    r27239 r27286  
    124124    if (RT_FAILURE(rc))
    125125    {
    126 #ifndef DEBUG_misha
    127126        dprintf(("VBoxVideo::vboxLikesVideoMode: ERROR allocating request, rc = %Rrc\n", rc));
    128 #else
    129         /* @todo: fixme: remove this ifdef*/
    130 #endif
    131127        /* Most likely the VBoxGuest driver is not loaded.
    132128         * To get at least the video working, report the mode as supported.
     
    151147        VbglGRFree(&req->header);
    152148    }
    153 #ifndef DEBUG_misha
     149
    154150    dprintf(("VBoxVideo::vboxLikesVideoMode: width: %d, height: %d, bpp: %d -> %s\n", width, height, bpp, (bRC == 1) ? "OK" : "FALSE"));
    155 #else
    156         /* @todo: fixme: remove this ifdef*/
    157 #endif
    158151
    159152    return bRC;
     
    164157    ULONG retHeight = 0;
    165158
    166 #ifndef DEBUG_misha
    167159    dprintf(("VBoxVideo::vboxGetHeightReduction\n"));
    168 #endif
    169160
    170161    VMMDevGetHeightReductionRequest *req = NULL;
     
    173164    if (RT_FAILURE(rc))
    174165    {
    175 #ifndef DEBUG_misha
    176166        dprintf(("VBoxVideo::vboxGetHeightReduction: ERROR allocating request, rc = %Rrc\n", rc));
    177 #endif
    178167    }
    179168    else
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r27240 r27286  
    11751175                     xres, yres, bpp));
    11761176    }
    1177 #if defined(LOG_ENABLED) && !defined(DEBUG_misha)
     1177#if defined(LOG_ENABLED)
    11781178    {
    11791179        int i;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r27201 r27286  
    600600        /* clear the visibility info fo the current primary */
    601601        pOldPrimaryInfo->bVisible = FALSE;
     602        pOldPrimaryInfo->bAssigned = FALSE;
    602603        Assert(pOldPrimaryInfo->VidPnSourceId == srcId);
    603         pOldPrimaryInfo->VidPnSourceId = ~0;
    604604    }
    605605
     
    608608        PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pPrimaryInfo = VBOXWDDM_ALLOCATION_BODY(pAllocation, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
    609609        pPrimaryInfo->bVisible = FALSE;
     610        Assert(pPrimaryInfo->VidPnSourceId == srcId);
    610611        pPrimaryInfo->VidPnSourceId = srcId;
     612        pPrimaryInfo->bAssigned = TRUE;
    611613    }
    612614
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoShgsmi.cpp

    r26969 r27286  
    182182    int rc = VINF_SUCCESS;
    183183
    184     PVBOXSHGSMIHEADER pCur = (PVBOXSHGSMIHEADER)HGSMIOffsetToPointer (&pHeap->area, offCmd);
     184    PVBOXSHGSMIHEADER pCur = (PVBOXSHGSMIHEADER)HGSMIBufferDataFromOffset (&pHeap->area, offCmd);
    185185    Assert(pCur);
    186186    if (pCur)
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.cpp

    r26969 r27286  
    256256void vboxVdmaCBufDrSubmit (PDEVICE_EXTENSION pDevExt, PVBOXVDMAINFO pInfo, PVBOXVDMACBUF_DR pDr)
    257257{
    258     VBoxSHGSMICommandSubmitAsynchIrq (&pInfo->CmdHeap, pDr, vboxVdmaCBufDrCompletionIrq, pDevExt, 0);
     258    VBoxSHGSMICommandSubmitAsynchIrq (&pInfo->CmdHeap, pDr, vboxVdmaCBufDrCompletionIrq, pDevExt, VBOXSHGSMI_FLAG_GH_ASYNCH_FORCE);
    259259}
    260260
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r27261 r27286  
    12291229    if (pCreateDevice->Flags.SystemDevice)
    12301230        pDevice->enmType = VBOXWDDM_DEVICE_TYPE_SYSTEM;
    1231     else
    1232     {
    1233         AssertBreakpoint(); /* we do not support custom contexts for now */
    1234         drprintf((__FUNCTION__ ": we do not support custom devices for now, hAdapter (0x%x)\n", hAdapter));
    1235     }
     1231//    else
     1232//    {
     1233//        AssertBreakpoint(); /* we do not support custom contexts for now */
     1234//        drprintf((__FUNCTION__ ": we do not support custom devices for now, hAdapter (0x%x)\n", hAdapter));
     1235//    }
    12361236
    12371237    pDevice->pAdapter = pContext;
     
    12491249    PAGED_CODE();
    12501250
     1251    switch (pAllocation->enmType)
     1252    {
     1253        case VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE:
     1254        {
     1255            PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pAlloc = VBOXWDDM_ALLOCATION_BODY(pAllocation, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
     1256            if (pAlloc->bAssigned)
     1257            {
     1258                /* @todo: do we need to notify host? */
     1259                vboxWddmAssignPrimary(pDevExt, &pDevExt->aSources[pAlloc->VidPnSourceId], NULL, pAlloc->VidPnSourceId);
     1260            }
     1261            break;
     1262        }
     1263        default:
     1264            break;
     1265    }
    12511266    vboxWddmMemFree(pAllocation);
    12521267    return STATUS_SUCCESS;
     
    13881403    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
    13891404
    1390     vboxVDbgBreakF();
     1405    vboxVDbgBreakFv();
    13911406
    13921407    NTSTATUS Status = STATUS_SUCCESS;
     
    14781493    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
    14791494
    1480     vboxVDbgBreakF();
     1495    vboxVDbgBreakFv();
    14811496
    14821497    NTSTATUS Status = STATUS_SUCCESS;
     
    16671682    VBOXVDMACMDBUF_INFO BufInfo = {0};
    16681683
    1669     Assert(pSubmitCommand->DmaBufferSegmentId);
     1684    Assert(!pSubmitCommand->DmaBufferSegmentId);
    16701685
    16711686    /* the DMA command buffer is located in system RAM, the host will need to pick it from there */
     
    17351750        case DXGK_OPERATION_TRANSFER:
    17361751        {
    1737             PVBOXWDDM_ALLOCATION pAllocation = (PVBOXWDDM_ALLOCATION)pBuildPagingBuffer->Transfer.hAllocation;
     1752            pBuildPagingBuffer->pDmaBuffer = (uint8_t*)pBuildPagingBuffer->pDmaBuffer + VBOXVDMACMD_SIZE(VBOXVDMACMD_DMA_BPB_TRANSFER);
    17381753            break;
    17391754        }
    17401755        case DXGK_OPERATION_FILL:
     1756        {
     1757            pBuildPagingBuffer->pDmaBuffer = (uint8_t*)pBuildPagingBuffer->pDmaBuffer + VBOXVDMACMD_SIZE(VBOXVDMACMD_DMA_BPB_FILL);
    17411758            break;
     1759        }
    17421760        case DXGK_OPERATION_DISCARD_CONTENT:
     1761        {
     1762            AssertBreakpoint();
    17431763            break;
     1764        }
    17441765        default:
     1766        {
    17451767            drprintf((__FUNCTION__": unsupported op (%d)\n", pBuildPagingBuffer->Operation));
    17461768            AssertBreakpoint();
    17471769            break;
     1770        }
    17481771    }
    17491772
     
    19952018    D3DKMDT_2DREGION *pResolutions;
    19962019    VBoxWddmGetModesTable(pDevExt, /* PDEVICE_EXTENSION DeviceExtension */
    1997             true, /* bool bRebuildTable*/
     2020            false, /* bool bRebuildTable*/
    19982021            &pModes, /* VIDEO_MODE_INFORMATION ** ppModes*/
    19992022            &cModes, /* uint32_t * pcModes */
     
    20602083            CbContext.pEnumCofuncModalityArg = pEnumCofuncModalityArg;
    20612084            VBoxWddmGetModesTable(pContext, /* PDEVICE_EXTENSION DeviceExtension */
    2062                     true, /* bool bRebuildTable*/
     2085                    false, /* bool bRebuildTable*/
    20632086                    &CbContext.pModes, /* VIDEO_MODE_INFORMATION ** ppModes*/
    20642087                    &CbContext.cModes, /* uint32_t * pcModes */
     
    23152338    D3DKMDT_2DREGION *pResolutions;
    23162339    VBoxWddmGetModesTable(pDevExt, /* PDEVICE_EXTENSION DeviceExtension */
    2317             true, /* bool bRebuildTable*/
     2340            false, /* bool bRebuildTable*/
    23182341            &pModes, /* VIDEO_MODE_INFORMATION ** ppModes*/
    23192342            &cModes, /* uint32_t * pcModes */
     
    24722495    dfprintf(("==> "__FUNCTION__ ", hDevice(0x%x)\n", hDevice));
    24732496
    2474     vboxVDbgBreakF();
     2497    vboxVDbgBreakFv();
    24752498
    24762499    NTSTATUS Status = STATUS_SUCCESS;
     
    26442667                    if (vboxWddmPixFormatConversionSupported(pSrcAlloc->u.SurfInfo.format, pDstAlloc->u.SurfInfo.format))
    26452668                    {
    2646                         memset(pPresent->pPatchLocationListOut, 0, 2*sizeof (D3DDDI_PATCHLOCATIONLIST));
     2669                        memset(pPresent->pPatchLocationListOut, 0, 3*sizeof (D3DDDI_PATCHLOCATIONLIST));
    26472670//                        pPresent->pPatchLocationListOut->PatchOffset = 0;
    2648 //                        ++pPresent->pPatchLocationListOut;
     2671                        ++pPresent->pPatchLocationListOut;
    26492672                        pPresent->pPatchLocationListOut->PatchOffset = VBOXVDMACMD_BODY_FIELD_OFFSET(UINT, VBOXVDMACMD_DMA_PRESENT_BLT, offSrc);
    2650                         pPresent->pPatchLocationListOut->AllocationIndex = 0;
     2673                        pPresent->pPatchLocationListOut->AllocationIndex = DXGK_PRESENT_SOURCE_INDEX;
    26512674                        ++pPresent->pPatchLocationListOut;
    26522675                        pPresent->pPatchLocationListOut->PatchOffset = VBOXVDMACMD_BODY_FIELD_OFFSET(UINT, VBOXVDMACMD_DMA_PRESENT_BLT, offDst);
    2653                         pPresent->pPatchLocationListOut->AllocationIndex = 1;
     2676                        pPresent->pPatchLocationListOut->AllocationIndex = DXGK_PRESENT_DESTINATION_INDEX;
    26542677                        ++pPresent->pPatchLocationListOut;
    26552678
     
    27832806    if (pCreateContext->Flags.SystemContext)
    27842807        pContext->enmType = VBOXWDDM_CONTEXT_TYPE_SYSTEM;
    2785     else
    2786     {
    2787         AssertBreakpoint(); /* we do not support custom contexts for now */
    2788         drprintf((__FUNCTION__ ", we do not support custom contexts for now, hDevice (0x%x)\n", hDevice));
    2789     }
     2808//    else
     2809//    {
     2810//        AssertBreakpoint(); /* we do not support custom contexts for now */
     2811//        drprintf((__FUNCTION__ ", we do not support custom contexts for now, hDevice (0x%x)\n", hDevice));
     2812//    }
    27902813
    27912814    pCreateContext->hContext = pContext;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h

    r27219 r27286  
    9191//    VBOXVIDEOOFFSET offAddress;
    9292    BOOLEAN bVisible;
     93    BOOLEAN bAssigned;
    9394} VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE, *PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE;
    9495
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