VirtualBox

Changeset 103981 in vbox for trunk


Ignore:
Timestamp:
Mar 21, 2024 10:37:16 AM (10 months ago)
Author:
vboxsync
Message:

WDDM: alignment

File:
1 edited

Legend:

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

    r103005 r103981  
    727727                 || pBuildPagingBuffer->Fill.Destination.SegmentId == pAllocation->dx.SegmentId, STATUS_INVALID_PARAMETER);
    728728
     729    /* "The size value is expanded to a multiple of the native host page size (for example, 4 KB on the x86 architecture)."
     730     * I.e. TransferOffset and TransferSize are within the aligned size.
     731     */
     732    SIZE_T const cbAllocation = RT_ALIGN_32(svgaGetAllocationSize(pAllocation), PAGE_SIZE);
     733
    729734    NTSTATUS Status = STATUS_SUCCESS;
    730735    switch (pBuildPagingBuffer->Fill.Destination.SegmentId)
     
    763768
    764769            /* Fill the guest backing pages. */
    765             uint32_t const cbFill = RT_MIN(pBuildPagingBuffer->Fill.FillSize, pAllocation->dx.desc.cbAllocation);
     770            uint32_t const cbFill = RT_MIN(pBuildPagingBuffer->Fill.FillSize, cbAllocation);
    766771            ASMMemFill32(pvDst, cbFill, pBuildPagingBuffer->Fill.FillPattern);
    767772
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