Changeset 39305 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
- Timestamp:
- Nov 15, 2011 11:23:35 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r39245 r39305 2391 2391 * we do not expect any other flags to be set here */ 2392 2392 // Assert(pPatch->Flags.Value == 2 || pPatch->Flags.Value == 4); 2393 Assert(pPatch->DmaBufferPrivateDataSize >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR));2394 Assert(pPatch->DmaBufferPrivateDataSubmissionEndOffset - pPatch->DmaBufferPrivateDataSubmissionStartOffset >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR));2395 2393 if (pPatch->DmaBufferPrivateDataSubmissionEndOffset - pPatch->DmaBufferPrivateDataSubmissionStartOffset >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR)) 2396 2394 { 2395 Assert(pPatch->DmaBufferPrivateDataSize >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR)); 2397 2396 VBOXWDDM_DMA_PRIVATEDATA_BASEHDR *pPrivateDataBase = (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR*)((uint8_t*)pPatch->pDmaBufferPrivateData + pPatch->DmaBufferPrivateDataSubmissionStartOffset); 2398 2397 switch (pPrivateDataBase->enmCmd) … … 2512 2511 } 2513 2512 } 2513 else if (pPatch->DmaBufferPrivateDataSubmissionEndOffset == pPatch->DmaBufferPrivateDataSubmissionStartOffset) 2514 { 2515 /* this is a NOP, just return success */ 2516 WARN(("null data size, treating as NOP")); 2517 return STATUS_SUCCESS; 2518 } 2514 2519 else 2515 2520 { 2516 LOGREL(("DmaBufferPrivateDataSubmissionEndOffset (%d) - DmaBufferPrivateDataSubmissionStartOffset (%d) < sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR) (%d)",2521 WARN(("DmaBufferPrivateDataSubmissionEndOffset (%d) - DmaBufferPrivateDataSubmissionStartOffset (%d) < sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR) (%d)", 2517 2522 pPatch->DmaBufferPrivateDataSubmissionEndOffset, 2518 2523 pPatch->DmaBufferPrivateDataSubmissionStartOffset, … … 2648 2653 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)hAdapter; 2649 2654 PVBOXWDDM_CONTEXT pContext = (PVBOXWDDM_CONTEXT)pSubmitCommand->hContext; 2655 PVBOXWDDM_DMA_PRIVATEDATA_BASEHDR pPrivateDataBase = NULL; 2656 VBOXVDMACMD_TYPE enmCmd = VBOXVDMACMD_TYPE_UNDEFINED; 2650 2657 Assert(pContext); 2651 2658 Assert(pContext->pDevice); … … 2655 2662 /* the DMA command buffer is located in system RAM, the host will need to pick it from there */ 2656 2663 //BufInfo.fFlags = 0; /* see VBOXVDMACBUF_FLAG_xx */ 2657 Assert(pSubmitCommand->DmaBufferPrivateDataSubmissionEndOffset - pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR)); 2658 if (pSubmitCommand->DmaBufferPrivateDataSubmissionEndOffset - pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset < sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR)) 2659 { 2660 LOGREL(("DmaBufferPrivateDataSubmissionEndOffset (%d) - DmaBufferPrivateDataSubmissionStartOffset (%d) < sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR) (%d)", 2664 if (pSubmitCommand->DmaBufferPrivateDataSubmissionEndOffset - pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR)) 2665 { 2666 pPrivateDataBase = (PVBOXWDDM_DMA_PRIVATEDATA_BASEHDR)((uint8_t*)pSubmitCommand->pDmaBufferPrivateData + pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset); 2667 Assert(pPrivateDataBase); 2668 enmCmd = pPrivateDataBase->enmCmd; 2669 } 2670 else if (pSubmitCommand->DmaBufferPrivateDataSubmissionEndOffset == pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset) 2671 { 2672 WARN(("null data size, treating as NOP")); 2673 enmCmd = VBOXVDMACMD_TYPE_DMA_NOP; 2674 } 2675 else 2676 { 2677 WARN(("DmaBufferPrivateDataSubmissionEndOffset (%d) - DmaBufferPrivateDataSubmissionStartOffset (%d) < sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR) (%d)", 2661 2678 pSubmitCommand->DmaBufferPrivateDataSubmissionEndOffset, 2662 2679 pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset, … … 2665 2682 } 2666 2683 2667 PVBOXWDDM_DMA_PRIVATEDATA_BASEHDR pPrivateDataBase = (PVBOXWDDM_DMA_PRIVATEDATA_BASEHDR)((uint8_t*)pSubmitCommand->pDmaBufferPrivateData + pSubmitCommand->DmaBufferPrivateDataSubmissionStartOffset); 2668 Assert(pPrivateDataBase); 2669 switch (pPrivateDataBase->enmCmd) 2684 switch (enmCmd) 2670 2685 { 2671 2686 #ifdef VBOXWDDM_RENDER_FROM_SHADOW … … 2926 2941 default: 2927 2942 { 2928 AssertBreakpoint();2943 WARN(("unexpected command %d", enmCmd)); 2929 2944 #if 0 //def VBOX_WITH_VDMA 2930 2945 VBOXWDDM_DMA_PRIVATEDATA_PRESENTHDR *pPrivateData = (VBOXWDDM_DMA_PRIVATEDATA_PRESENTHDR*)pPrivateDataBase;
Note:
See TracChangeset
for help on using the changeset viewer.