Class DxgiDevice3
The IDXGIDevice3 interface implements a derived class for DXGI objects that produce image data. The interface exposes a method to trim graphics memory usage by the DXGI device.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.Dxgi
Assembly: JeremyAnsel.DirectX.Dxgi.dll
Syntax
[SecurityCritical]
public class DxgiDevice3 : DxgiObject, IDisposable
Constructors
| Edit this page View SourceDxgiDevice3(nint)
Initializes a new instance of the DxgiDevice3 class.
Declaration
public DxgiDevice3(nint comPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | comPtr |
Fields
| Edit this page View SourceDxgiDevice3Guid
The interface GUID.
Declaration
public static readonly Guid DxgiDevice3Guid
Field Value
| Type | Description |
|---|---|
| Guid |
Properties
| Edit this page View SourceMaximumFrameLatency
Gets or sets the number of frames that the system is allowed to queue for rendering.
Declaration
public uint MaximumFrameLatency { get; set; }
Property Value
| Type | Description |
|---|---|
| uint | The number of frames that can be queued for render. This value defaults to 3, but can range from 1 to 16. |
Methods
| Edit this page View SourceCreateDeviceFromDevice(DXComObject)
Initializes a new instance of the DxgiDevice3 class.
Declaration
public static DxgiDevice3 CreateDeviceFromDevice(DXComObject device)
Parameters
| Type | Name | Description |
|---|---|---|
| DXComObject | device | A device interface which implements the |
Returns
| Type | Description |
|---|---|
| DxgiDevice3 |
CreateDeviceFromDevice(nint)
Initializes a new instance of the DxgiDevice3 class.
Declaration
public static DxgiDevice3 CreateDeviceFromDevice(nint device)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | device | A device interface which implements the |
Returns
| Type | Description |
|---|---|
| DxgiDevice3 |
GetAdapter()
Returns the adapter for the specified device.
Declaration
public DxgiAdapter3 GetAdapter()
Returns
| Type | Description |
|---|---|
| DxgiAdapter3 | The adapter for the specified device. |
OfferResources(DxgiResource3, DxgiOfferResourcePriority)
Allows the operating system to free the video memory of resources by discarding their content.
Declaration
public void OfferResources(DxgiResource3 resource, DxgiOfferResourcePriority priority)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiResource3 | resource | A |
| DxgiOfferResourcePriority | priority | A |
OfferResources(DxgiResource3?[]?, DxgiOfferResourcePriority)
Allows the operating system to free the video memory of resources by discarding their content.
Declaration
public void OfferResources(DxgiResource3?[]? resources, DxgiOfferResourcePriority priority)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiResource3[] | resources | An array of pointers to |
| DxgiOfferResourcePriority | priority | A |
OfferResources(ReadOnlySpan<DxgiResource3>, DxgiOfferResourcePriority)
Allows the operating system to free the video memory of resources by discarding their content.
Declaration
public void OfferResources(ReadOnlySpan<DxgiResource3> resources, DxgiOfferResourcePriority priority)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<DxgiResource3> | resources | An array of pointers to |
| DxgiOfferResourcePriority | priority | A |
QueryResourceResidency(DxgiResource3)
Gets the residency status of a resource.
Declaration
public DxgiResidency QueryResourceResidency(DxgiResource3 resource)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiResource3 | resource | An |
Returns
| Type | Description |
|---|---|
| DxgiResidency | A |
QueryResourceResidency(DxgiResource3?[]?)
Gets the residency status of an array of resources.
Declaration
public DxgiResidency[] QueryResourceResidency(DxgiResource3?[]? resources)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiResource3[] | resources | An array of |
Returns
| Type | Description |
|---|---|
| DxgiResidency[] | An array of |
QueryResourceResidency(ReadOnlySpan<DxgiResource3>, Span<DxgiResidency>)
Gets the residency status of an array of resources.
Declaration
public void QueryResourceResidency(ReadOnlySpan<DxgiResource3> resources, Span<DxgiResidency> residencies)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<DxgiResource3> | resources | An array of |
| Span<DxgiResidency> | residencies | An array of |
ReclaimResources(DxgiResource3)
Restores access to resources that were previously offered by calling IDXGIDevice3::OfferResources.
Declaration
public bool ReclaimResources(DxgiResource3 resource)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiResource3 | resource | An |
Returns
| Type | Description |
|---|---|
| bool | A pointer to an array that receives Boolean values. Each value in the array corresponds to a resource at the same index that the ppResources parameter specifies. The runtime sets each Boolean value to |
ReclaimResources(DxgiResource3?[]?)
Restores access to resources that were previously offered by calling IDXGIDevice3::OfferResources.
Declaration
public bool[] ReclaimResources(DxgiResource3?[]? resources)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiResource3[] | resources | An array of pointers to |
Returns
| Type | Description |
|---|---|
| bool[] | A pointer to an array that receives Boolean values. Each value in the array corresponds to a resource at the same index that the ppResources parameter specifies. The runtime sets each Boolean value to |
ReclaimResources(ReadOnlySpan<DxgiResource3>, Span<bool>)
Restores access to resources that were previously offered by calling IDXGIDevice3::OfferResources.
Declaration
public void ReclaimResources(ReadOnlySpan<DxgiResource3> resources, Span<bool> discarded)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<DxgiResource3> | resources | An array of pointers to |
| Span<bool> | discarded | A pointer to an array that receives Boolean values. Each value in the array corresponds to a resource at the same index that the ppResources parameter specifies. The runtime sets each Boolean value to |
Trim()
Trims the graphics memory allocated by the IDXGIDevice3 DXGI device on the app's behalf.
Declaration
public void Trim()