Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::PipelineResourceLayoutDesc Struct Reference

Pipeline layout description. More...

#include <PipelineState.h>

Inheritance diagram for Diligent::PipelineResourceLayoutDesc:
Diligent::PipelineResourceLayoutDescX

Public Member Functions

bool operator== (const PipelineResourceLayoutDesc &RHS) const noexcept
 Comparison operator tests if two structures are equivalent.
 

Static Public Member Functions

static bool IsEqual (const PipelineResourceLayoutDesc &Desc1, const PipelineResourceLayoutDesc &Desc2, bool IgnoreVariables=false, bool IgnoreSamplers=false)
 

Public Attributes

SHADER_RESOURCE_VARIABLE_TYPE DefaultVariableType = SHADER_RESOURCE_VARIABLE_TYPE_STATIC
 Default shader resource variable type.
 
SHADER_TYPE DefaultVariableMergeStages = SHADER_TYPE_UNKNOWN
 Default shader variable merge stages.
 
Uint32 NumVariables = 0
 Number of elements in Variables array.
 
const ShaderResourceVariableDescVariables = nullptr
 Array of shader resource variable descriptions.
 
Uint32 NumImmutableSamplers = 0
 Number of immutable samplers in ImmutableSamplers array.
 
const ImmutableSamplerDescImmutableSamplers = nullptr
 Array of immutable sampler descriptions.
 

Detailed Description

Pipeline layout description.

Member Function Documentation

◆ IsEqual()

static bool Diligent::PipelineResourceLayoutDesc::IsEqual ( const PipelineResourceLayoutDesc & Desc1,
const PipelineResourceLayoutDesc & Desc2,
bool IgnoreVariables = false,
bool IgnoreSamplers = false )
inlinestatic

Returns true if two resource layout descriptions are equal, and false otherwise. Optionally ignores variable descriptions and/or sampler descriptions.

Member Data Documentation

◆ DefaultVariableMergeStages

SHADER_TYPE Diligent::PipelineResourceLayoutDesc::DefaultVariableMergeStages = SHADER_TYPE_UNKNOWN

Default shader variable merge stages.

By default, all variables not found in the Variables array define separate resources. For example, if there is resource "g_Texture" in the vertex and pixel shader stages, there will be two separate resources in both stages. This member defines shader stages in which default variables will be combined. For example, if DefaultVariableMergeStages == SHADER_TYPE_VERTEX | SHADER_TYPE_PIXEL, then both resources in the example above will be combined into a single one. If there is another "g_Texture" in geometry shader, it will be separate from combined vertex-pixel "g_Texture". This member has no effect on variables defined in Variables array.

◆ DefaultVariableType

SHADER_RESOURCE_VARIABLE_TYPE Diligent::PipelineResourceLayoutDesc::DefaultVariableType = SHADER_RESOURCE_VARIABLE_TYPE_STATIC

Default shader resource variable type.

This type will be used if shader variable description is not found in the Variables array or if Variables == nullptr

◆ Variables

const ShaderResourceVariableDesc* Diligent::PipelineResourceLayoutDesc::Variables = nullptr

Array of shader resource variable descriptions.

There may be multiple variables with the same name that use different shader stages, but the stages must not overlap.