// d3dukmdt.h
typedef struct D3DDDI_EVICT_FLAGS {
union {
struct {
UINT EvictOnlyIfNecessary : 1;
UINT NotWrittenTo : 1;
UINT Reserved : 30;
};
UINT Value;
};
} D3DDDI_EVICT_FLAGS;
View the official Windows Driver Kit DDI referenceNo description available.
D3DDDI_EVICT_FLAGS specifies the eviction behavior.
EvictOnlyIfNecessaryWhen set, this indicates that the resource may be used again in the near future and instructs the OS to try to defer actual resource eviction from the GPU until low memory conditions. When not set, this instructs the OS that the resource will no longer be used and that the eviction should be performed at the earliest opportunity.
Note This flag is ignored if the residency reference count does not hit zero because the allocation will not be evicted until that time.
NotWrittenToWhen set, this indicates that the resource has not been written to by the GPU since the time it was made resident. This allows the OS to optimize the eviction process by discarding the allocation contents instead of paging it out to the system memory. The driver must opt-in to use this flag. By default, the value is zero and the allocation is considered dirty during eviction. Unlike EvictOnlyIfNecessary, the driver does not need to defer setting this flag until the last call to Evict (pfnEvictCb or D3DKMTEvict), and the effects of specifying this flag take place immediately. In other words, if the driver calls MakeResident multiple times, it is valid for any one of the subsequent Evict operations to specify this flag. The driver is not expected to track this flag until the last call.
ReservedThis member is reserved and should be set to zero.
ValueThe consolidated value of the flags in the structure.