DML_BUFFER_BINDING structure (directml.h)

Specifies a resource binding described by a range of bytes in a Direct3D 12 buffer, represented by an offset and size into an ID3D12Resource.

Syntax

struct DML_BUFFER_BINDING {
  ID3D12Resource *Buffer;
  UINT64         Offset;
  UINT64         SizeInBytes;
};

Members

Buffer

Type: ID3D12Resource*

An optional pointer to an ID3D12Resource interface representing a buffer. The resource must have dimension D3D12_RESOURCE_DIMENSION_BUFFER, and the range described by this struct must lie within the bounds of the buffer. You may supply nullptr for this member to indicate 'no binding'.

Offset

Type: UINT64

The offset, in bytes, from the start of the buffer where the range begins. This offset must be aligned to a multiple of DML_MINIMUM_BUFFER_TENSOR_ALIGNMENT or the GuaranteedBaseOffsetAlignment supplied as part of the DML_BUFFER_TENSOR_DESC.

SizeInBytes

Type: UINT64

The size of the range, in bytes.

Requirements

Requirement Value
Header directml.h

See also

Binding in DirectML