CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT 结构
一种模板化帮助程序结构,用于将子对象类型和子对象数据对封装为适合流说明的单个对象。
语法
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;
};
成员
-
CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT
-
创建CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT的未初始化的新实例。
-
CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT (InnerStructType const &i)
-
创建一个新的 CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT 模板实例,该实例使用从 i 复制的D3D12_PIPELINE_STATE_SUBOBJECT_TYPE子对象类型的子对象和子对象数据进行初始化。 子对象类型和子对象数据类型分别作为模板参数 Type 和 InnerStructType 提供。 有关详细信息,请参阅下面的“备注”。
-
operator= (InnerStructType const& i)
-
复制赋值运算符。
-
operator InnerStructType () const
-
隐式转换为 InnerStructType 模板参数给定的子对象数据类型。
备注
CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT是定义如下的模板:
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; }
};
模板参数 InnerStructType 指定子对象数据类型;即要编码为流的子对象详细信息。 模板参数 Type 指定子对象类型;即由模板参数 InnerStructType 指定的结构的类型。 模板参数 DefaultArg 指定一个可选值,当相应模板实例化实例化为默认构造时,子对象数据将被初始化为 ;例如,若要默认构造CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC使用CD3DX12_DEFAULT使用常见混合状态默认值进行初始化。
下面是定义的模板实例化:
- CD3DX12_PIPELINE_STATE_STREAM_FLAGS
- CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK
- CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE
- CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT
- CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE
- CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY
- CD3DX12_PIPELINE_STATE_STREAM_VS
- CD3DX12_PIPELINE_STATE_STREAM_GS
- CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT
- CD3DX12_PIPELINE_STATE_STREAM_HS
- CD3DX12_PIPELINE_STATE_STREAM_DS
- CD3DX12_PIPELINE_STATE_STREAM_PS
- CD3DX12_PIPELINE_STATE_STREAM_CS
- CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC
- CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL
- CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1
- CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT
- CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER
- CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS
- CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC
- CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK
- CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO
定义CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC、CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL、CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1和CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER结构,以使用CD3DX12_DEFAULT的常见默认值初始化其子对象数据。
要求
要求 | 值 |
---|---|
标头 |
|