VirtualBox

Changeset 51017 in vbox


Ignore:
Timestamp:
Apr 9, 2014 4:31:50 PM (11 years ago)
Author:
vboxsync
Message:

wddm: fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r50987 r51017  
    35403540            }
    35413541            /** @todo: add necessary bits */
    3542             WARN(("Impl!"));
     3542//            WARN(("Impl!"));
    35433543            cbBuffer = VBOXWDDM_DUMMY_DMABUFFER_SIZE;
    35443544            break;
     
    35523552                return STATUS_INVALID_PARAMETER;
    35533553            }
    3554             WARN(("Do we need to do anything here?"));
     3554//            WARN(("Do we need to do anything here?"));
    35553555            break;
    35563556        }
     
    58095809        WARN(("Present->DmaBufferPrivateDataSize(%d) < sizeof VBOXWDDM_DMA_PRIVATEDATA_BASEHDR (%d)",
    58105810                pRender->DmaBufferPrivateDataSize , sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR)));
    5811         /* @todo: can this actually happen? what status to return? */
    58125811        return STATUS_INVALID_PARAMETER;
    58135812    }
    5814 
     5813    if (pRender->PatchLocationListOutSize < pRender->AllocationListSize)
     5814    {
     5815        WARN(("pRender->PatchLocationListOutSize(%d) < pRender->AllocationListSize(%d)",
     5816                pRender->PatchLocationListOutSize, pRender->AllocationListSize));
     5817        return STATUS_INVALID_PARAMETER;
     5818    }
     5819
     5820    NTSTATUS Status = STATUS_SUCCESS;
     5821
     5822    __try
     5823    {
    58155824    PVBOXWDDM_DMA_PRIVATEDATA_BASEHDR pInputHdr = (PVBOXWDDM_DMA_PRIVATEDATA_BASEHDR)pRender->pCommand;
    58165825    NTSTATUS Status = STATUS_SUCCESS;
     
    58835892            for (UINT i = 0; i < pRender->AllocationListSize; ++i, ++pRender->pPatchLocationListOut, ++pAllocationList, ++pSubmInfo, ++pSubmUmInfo)
    58845893            {
     5894                VBOXWDDM_UHGSMI_BUFFER_UI_SUBMIT_INFO SubmUmInfo = *pSubmUmInfo;
    58855895                D3DDDI_PATCHLOCATIONLIST* pPLL = pRender->pPatchLocationListOut;
    58865896                PVBOXWDDM_ALLOCATION pAlloc = vboxWddmGetAllocationFromAllocList(pDevExt, pAllocationList);
    5887                 if (pSubmUmInfo->offData >= pAlloc->AllocData.SurfDesc.cbSize
    5888                         || pSubmUmInfo->cbData > pAlloc->AllocData.SurfDesc.cbSize
    5889                         || pSubmUmInfo->offData + pSubmUmInfo->cbData > pAlloc->AllocData.SurfDesc.cbSize)
     5897                if (SubmUmInfo.offData >= pAlloc->AllocData.SurfDesc.cbSize
     5898                        || SubmUmInfo.cbData > pAlloc->AllocData.SurfDesc.cbSize
     5899                        || SubmUmInfo.offData + SubmUmInfo.cbData > pAlloc->AllocData.SurfDesc.cbSize)
    58905900                {
    58915901                    WARN(("invalid data"));
     
    58965906
    58975907                if (pAllocationList->SegmentId)
    5898                     pSubmInfo->offBuffer = pAllocationList->PhysicalAddress.LowPart + pSubmUmInfo->offData;
    5899 
    5900                 pSubmInfo->cbBuffer = pSubmUmInfo->cbData;
     5908                    pSubmInfo->offBuffer = pAllocationList->PhysicalAddress.LowPart + SubmUmInfo.offData;
     5909
     5910                pSubmInfo->cbBuffer = SubmUmInfo.cbData;
    59015911
    59025912                pPLL->AllocationIndex = i;
    59035913                pPLL->PatchOffset = RT_OFFSETOF(VBOXCMDVBVA_CRCMD, Cmd.aBuffers[i].offBuffer);
    5904                 pPLL->AllocationOffset = pSubmUmInfo->offData;
     5914                pPLL->AllocationOffset = SubmUmInfo.offData;
    59055915            }
    59065916
     
    59395949        }
    59405950        default:
    5941         {
    5942             WARN(("unsupported render command %d", pInputHdr->enmCmd));
    5943             return STATUS_INVALID_PARAMETER;
    5944         }
     5951         {
     5952             WARN(("unsupported render command %d", pInputHdr->enmCmd));
     5953             return STATUS_INVALID_PARAMETER;
     5954         }
    59455955    }
    59465956
     
    59515961    /* sanity */
    59525962    pCmd->u32FenceID = 0;
    5953 
     5963    }
     5964    __except (EXCEPTION_EXECUTE_HANDLER)
     5965    {
     5966        Status = STATUS_INVALID_PARAMETER;
     5967        WARN(("invalid parameter"));
     5968    }
    59545969//    LOGF(("LEAVE, hContext(0x%x)", hContext));
    59555970
    5956     return STATUS_SUCCESS;
     5971    return Status;
     5972
     5973//    LOGF(("LEAVE, hContext(0x%x)", hContext));
     5974
     5975    return Status;
    59575976}
    59585977#endif
     
    59735992//    LOGF(("ENTER, hContext(0x%x)", hContext));
    59745993
    5975     Assert(pRender->DmaBufferPrivateDataSize >= sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR));
    59765994    if (pRender->DmaBufferPrivateDataSize < sizeof (VBOXWDDM_DMA_PRIVATEDATA_BASEHDR))
    59775995    {
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