D3DKMDT_FENCESTORAGESURFACEDATA structure (d3dkmddi.h)

The D3DKMDT_FENCESTORAGESURFACEDATA structure describes the memory segments where the fence storage should be placed.

Syntax

typedef struct _D3DKMDT_FENCESTORAGESURFACEDATA {
  UINT                          PhysicalAdapterIndex;
  DXGKARG_FENCESTORAGEVALUETYPE FenceStorageValueType;
  D3DDDI_NATIVEFENCE_TYPE       FenceStorageType;
  UINT                          PrivateDriverDataSize;
  BYTE                          *pPrivateDriverData;
  DXGKARG_FENCESTORAGEFLAGS     Flags;
  UINT                          Reserved;
  DXGK_ALLOCATIONINFO           AllocationInfo;
} D3DKMDT_FENCESTORAGESURFACEDATA;

Members

PhysicalAdapterIndex

[in] The physical adapter index in an LDA configuration where the fence storage will be resident.

FenceStorageValueType

[in] A DXGKARG_FENCESTORAGEVALUETYPE value that specifies the type of the native fence value.

FenceStorageType

[in] A D3DDDI_NATIVEFENCE_TYPE value that specifies the type of the native fence.

PrivateDriverDataSize

[in] The size, in bytes, of the private driver data that pPrivateDriverData points to.

pPrivateDriverData

[in] A pointer to the private driver data. Reserved for future use.

Flags

[in] A DXGKARG_FENCESTORAGEFLAGS value that specifies the flags for the fence storage.

Reserved

[in] Reserved for future use.

AllocationInfo

[out] A DXGK_ALLOCATIONINFO structure in which the driver should return allocation properties.

Remarks

When the OS calls the kernel-mode driver's DxgkDdiGetStandardAllocation function with a standard allocation type of D3DKMDT_STANDARDALLOCATION_FENCESTORAGE, the driver must return the memory segments where the fence storage should be placed in D3DKMDT_FENCESTORAGESURFACEDATA.

Based on the input fields, the driver needs to fill the following allocation information in AllocationInfo:

  • SupportedWriteSegmentSet
  • EvictionSegmentSet
  • PreferredSegment

The driver should ignore the pointer to private data. The driver shouldn't not check that the pointer is NULL and shouldn't request private data by setting its size.

Monitored values of native fences must be placed in a CPU visible memory segment, because they are updated using CPU pointers.

After the creation of a native fence object that has the D3DDDI_NATIVEFENCE_TYPE_INTRA_GPU type, the user-mode driver must always set the initial value by submitting a DMA packet using a GPU virtual address. Current values are packed in a 4K memory page, which can be in a non-CPU visible local memory segment. So, the OS doesn't have a way to set the initial value.

Shared allocations are always placed in system memory.

For more information, see Native GPU fence objects.

Requirements

Requirement Value
Minimum supported client Windows 11, version 24H2 (WDDM 3.2)
Header d3dkmddi.h

See also

D3DDDI_NATIVEFENCE_TYPE

D3DKMDT_STANDARDALLOCATION_TYPE

DXGK_ALLOCATIONINFO

DXGKARG_FENCESTORAGEFLAGS

DXGKARG_FENCESTORAGEVALUETYPE

DXGKARG_GETSTANDARDALLOCATIONDRIVERDATA

DxgkDdiGetStandardAllocation