CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT structure

A templated helper structure used to encapsulate subobject type and subobject data pairs as a single object suitable for a stream description.

Syntax

struct CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT {
                                          CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT;
                                          CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT(InnerStructType const &i);
  CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT operator=(InnerStructType const& i);
                                          operator InnerStructType() const;
};

Members

CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT

Creates a new, uninitialized, instance of a CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT.

CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT(InnerStructType const &i)

Creates a new CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT template instance, initialized with a subobject type of D3D12_PIPELINE_STATE_SUBOBJECT_TYPE and subobject data copied from i. Both the subobject type and subobject data type are given as template parameters, Type and InnerStructType, respectively. For more information, see Remarks below.

operator=(InnerStructType const& i)

Copy-assignment operator.

operator InnerStructType() const

Implicit conversion to the subobject data type given by the InnerStructType template parameter.

Remarks

CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT is a template defined as follows:

template <typename InnerStructType, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type, typename DefaultArg = InnerStructType>
class alignas(void*) CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT
{
private:
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE _Type;
    InnerStructType _Inner;
public:
    CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT() : _Type(Type), _Inner(DefaultArg()) {}
    CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT(InnerStructType const& i) : _Type(Type), _Inner(i) {}
    CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT& operator=(InnerStructType const& i) { _Inner = i; return *this; }
    operator InnerStructType() const { return _Inner; }
};  
          

The template parameter InnerStructType specifies the subobject data type; that is, the subobject details to be encoded into a stream. The template parameter Type specifies the subobject type; that is, the type of the structure specified by the template parameter InnerStructType. The template parameter DefaultArg specifies an optional value that the subobject data will be initialized to when an instance of the corresponding template instantiation is default-constructed; for example, to default-construct a CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC initialized with common blend-state defaults using CD3DX12_DEFAULT.

Here are the template instantiations that are defined:

The CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC, CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL, CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1, and CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER structures are defined to initialize their subobject data with common defaults using CD3DX12_DEFAULT.

Requirements

Requirement Value
Header
D3dx12.h

See also

Helper Structures for D3D12

D3D12_PIPELINE_STATE_SUBOBJECT_TYPE