// d3dukmdt.h
typedef struct D3DDDI_MAPGPUVIRTUALADDRESS {
D3DKMT_HANDLE hPagingQueue;
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS MinimumAddress;
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS MaximumAddress;
D3DKMT_HANDLE hAllocation;
D3DKMT_ALIGN64 D3DGPU_SIZE_T OffsetInPages;
D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInPages;
D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE Protection;
D3DKMT_ALIGN64 UINT64 DriverProtection;
UINT Reserved0;
D3DKMT_ALIGN64 UINT64 Reserved1;
D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS VirtualAddress;
D3DKMT_ALIGN64 UINT64 PagingFenceValue;
} D3DDDI_MAPGPUVIRTUALADDRESS;
View the official Windows Driver Kit DDI referenceNo description available.
The D3DDDI_MAPGPUVIRTUALADDRESS structure is used with pfnMapGpuVirtualAddressCb to map a GPU virtual address range to a specific allocation range or to put it to the Invalid or Zero state.
hPagingQueueA handle for the device paging queue, used for the operation.
BaseAddress(Optional) If non-NULL, the video memory manager will attempt to use this address as the base address for the mapping. If the range from BaseAddress to BaseAddress+Size isn’t free, it must belong to a range, previously obtained by calling pfnReserveGpuVirtualAddressCb or pfnMapGpuVirtualAddressCb.
The BaseAddress value is in bytes and must be aligned to CPU page boundary. If NULL is specified, the video memory manager will pick the base address for the allocation within the specified MinimumAddress and MaximumAddress.
MinimumAddress(Optional) Specifies the minimum GPU virtual address to consider for the mapped range.
The MinimumAddress value is in bytes and must be aligned to 4KB page. This parameter is ignored when BaseAddress != NULL.
MaximumAddress(Optional) Specifies the maximum GPU virtual address to consider for the mapped range. the video memory manager will guarantee that BaseAddress+Size <= MaximumAddress. If MaximumAddress is set to NULL the video memory manager will not apply any limit.
The MaximumAddress value is in bytes and must be aligned to the 4KB page. This parameter is ignored when BaseAddress != NULL.
hAllocationHandle to the allocation being mapped into the GPU virtual address space. Must be NULL when Protection.NoAccess or Protection.Zero is specified.
OffsetInPagesSpecifies the offset, in 4KB, to the starting page within the specified allocation that must be mapped.
SizeInPagesSpecifies the size of the range to map, in 4KB pages.
ProtectionA D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE structure that specifies the protection on the GPU virtual address that is mapped.
DriverProtectionSpecifies a driver-specific, 64-bit protection value associated with the VA range being allocated. The specified driver protection will be used in call to DxgkDdiUpdatePageTable for page table entries corresponding to this virtual address range.
Reserved0This member is reserved and should be set to zero.
Reserved1This member is reserved and should be set to zero.
VirtualAddressThe virtual address assigned to the allocation.
PagingFenceValueThe device paging fence value that the video memory manager signals when the map operation completes on the GPU. The user-mode driver must ensure that this fence is retired or explicitly wait on either the CPU or the GPU on that fence before allowing the GPU to access the mapped range or an unrecoverable fault might occur. A zero fence value might be returned, meaning that the operation is already completed.
D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE