// d3dukmdt.h
typedef struct _D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION {
D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION_TYPE OperationType;
union {
struct {
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
D3DKMT_HANDLE hAllocation;
D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationOffsetInBytes;
D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationSizeInBytes;
} Map;
struct {
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
D3DKMT_HANDLE hAllocation;
D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationOffsetInBytes;
D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationSizeInBytes;
D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE Protection;
D3DKMT_ALIGN64 UINT64 DriverProtection;
} MapProtect;
struct {
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE Protection;
} Unmap;
struct {
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS SourceAddress;
D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS DestAddress;
} Copy;
};
} D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION;
View the official Windows Driver Kit DDI referenceNo description available.
D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION describes a virtual address update operation.
OperationTypeMapMaps the given virtual address range to the given allocation range. The allocation does not have to be resident at the time of submission or at the time of mapping. The read-write protection is set to the pages. DriverProtection for the pages is set to zero.
Map.BaseAddressSpecifies the BaseAddress of the GPU virtual address range to update. The value is in bytes and must be 4KB aligned.
The entire range from BaseAddress to BaseAddress+SizeInBytes must be in the reserved (zero) or mapped state, or the pfnUpdateGpuVirtualAddressCb operation will fail. The virtual address ranges for all operations must belong to a virtual address range which is reserved by the same pfnReserveGpuVirtualAddressCb call.
Map.SizeInBytesSpecifies the size, in bytes, for the range being updated. The value must be 4KB aligned.
Map.hAllocationSpecifies the allocation the range needs to be mapped to.
Map.AllocationOffsetInBytesSpecifies the offset, in bytes, to the first page in the allocation to map. The value must be 4KB aligned.
Map.AllocationSizeInBytesSpecifies the size of the allocation range to map, in bytes. The value must be 4KB aligned and must be less than Map.SizeInBytes. If this value is zero, Map.SizeInBytes is used.
When this value is than Map.SizeInBytes, Map.SizeInBytes must be a multiple of it. In this case Map.SizeInBytes/Map.AllocationSizeInBytes virtual address ranges will be mapped to the same allocation range.
MapProtectMaps the given virtual address range to the given allocation range. The allocation does not have to be resident at the time of submission or at the time of mapping. The page protection is specified in the operation.
MapProtect.BaseAddressSpecifies the BaseAddress of the GPU virtual address range to update. The value is in bytes and must be 4KB aligned.
The entire range from BaseAddress to BaseAddress+SizeInBytes must be in the reserved (zero) or mapped state, or pfnUpdateGpuVirtualAddressCb will fail. The virtual address ranges for all operations must belong to a virtual address range which is reserved by the same pfnReserveGpuVirtualAddressCb call.
MapProtect.SizeInBytesSpecifies the size, in bytes, for the range being updated. The value must be 4KB aligned.
MapProtect.hAllocationSpecifies the allocation the range needs to be mapped to.
MapProtect.AllocationOffsetInBytesSpecifies the offset, in bytes, to the first page in the allocation to map. The value must be 4KB aligned.
MapProtect.AllocationSizeInBytesSpecifies the size of the allocation range to map, in bytes. The value must be 4KB aligned and must be less than Map.SizeInBytes. If this value is zero, Map.SizeInBytes is used.
When this value is less than Map.SizeInBytes, Map.SizeInBytes must be a multiple of it. In this case Map.SizeInBytes/Map.AllocationSizeInBytes virtual address ranges will be mapped to the same allocation range.
MapProtect.ProtectionSpecifies API defined protection for the pages.
MapProtect.DriverProtectionSpecifies driver specific protection for the pages.
UnmapPuts the specified virtual address range to the zero state or to the invalid state.
Unmap.BaseAddressSpecifies the BaseAddress of the GPU virtual address range to put back into the zero state. The value is in bytes and must be 4KB aligned.
Unmap.SizeInBytesSpecifies the size, in bytes, for the range to be freed. The value must be 4KB aligned.
Unmap.ProtectionDefines is the page table entry state after un-mapping, either Zero or NoAccess.
CopyThe copy operation copies all mappings from source GPU virtual address range to the destination range. The source and destination ranges are allowed to intersect. Both ranges must belong to a reserved (zero) virtual address range.
Specifies the start virtual address of the source virtual address range. The value is in bytes and must be 4KB aligned.
Copy.SourceAddressCopy.SizeInBytesSpecifies the size, in bytes, for the range being copied. The value must be 4KB aligned.
Copy.DestAddressSpecifies the start virtual address of the destination virtual address range. The value is in bytes and must be 4KB aligned.