Upravit

Sdílet prostřednictvím


Multi-adapter systems

Describes support in Direct3D 12 for systems that have multiple adapters installed, covering scenarios where your application explicitly targets multiple GPU adapters, and scenarios where drivers implicitly use multiple GPU adapters on behalf of your application.

Multi-adapter overview

A GPU adapter can be any adapter (graphics or compute, discrete or integrated), from any manufacturer, that supports Direct3D 12.

Multiple adapters are referenced as nodes. A number of elements, such as the queues, apply to each node, so if there are two nodes, there will be two default 3D queues. Other elements, such as the pipeline state and root and command signatures, can refer to one or more or all of the nodes, as shown in the diagram.

queues apply to each graphics adapter

Sharing heaps across adapters

See the Shared Heaps topic.

Multi-adapter APIs, and node masks

Similar to previous Direct3D APIs, each set of linked adapters is enumerated as a single IDXGIAdapter3 object. All outputs attached to any adapter in the link are enumerated as attached to the single IDXGIAdapter3 object.

Your application can determine the number of physical adapters associated with a given device by calling ID3D12Device::GetNodeCount.

Many APIs in Direct3D 12 accept a node mask (a bit mask), which indicates the set of nodes to which the API call refers. Each node has a zero-based index. But in the node mask, zero translates to bit 1; 1 translates to bit 2; and so on.

Single nodes

When calling the following (single node) APIs, your application specifies a single node with which the API call will be associated. Most of the time, this is specified by a node mask. Each bit in the mask corresponds to a single node. For all of the APIs described in this section, you must set exactly one bit in the node mask.

Multiple nodes

When calling the following (multiple node) APIs, your application specifies a set of nodes with which the API call will be associated. You specify node affinity as a node mask, potentially with multiple bits set. If your application passes 0 for this bit mask, then the Direct3D 12 driver converts that to the bit mask 1 (indicating that the object is associated with node 0).

Resource creation APIs

The following APIs reference node masks.

When creating a reserved resource, no node index or mask is specified. The reserved resource can be mapped onto a heap on any node (following the cross-node sharing rules).

The method MakeResident works internally with adapter queues, there is no need for your application to specify anything for this.

When calling the following ID3D12Device APIs, your application doesn't need to specify a set of nodes that the API call will be associated with because the API call applies to all nodes.

Direct3D 12 Programming Guide