Diligent Engine  v.2.4.g
Namespaces | Macros | Functions
PipelineStateBase.cpp File Reference
#include "PipelineStateBase.hpp"
#include <unordered_set>
#include <unordered_map>
#include <array>
#include "HashUtils.hpp"
#include "StringTools.hpp"

Namespaces

 Diligent
 The library uses Direct3D-style math:
 

Macros

#define LOG_PSO_ERROR_AND_THROW(...)   LOG_ERROR_AND_THROW("Description of ", GetPipelineTypeString(PSODesc.PipelineType), " PSO '", (PSODesc.Name != nullptr ? PSODesc.Name : ""), "' is invalid: ", ##__VA_ARGS__)
 
#define VALIDATE_SHADER_TYPE(Shader, ExpectedType, ShaderName)
 

Functions

void Diligent::ValidateGraphicsPipelineCreateInfo (const GraphicsPipelineStateCreateInfo &CreateInfo, const DeviceFeatures &Features) noexcept(false)
 
void Diligent::ValidateComputePipelineCreateInfo (const ComputePipelineStateCreateInfo &CreateInfo, const DeviceFeatures &Features) noexcept(false)
 
void Diligent::ValidateRayTracingPipelineCreateInfo (IRenderDevice *pDevice, Uint32 MaxRecursion, const RayTracingPipelineStateCreateInfo &CreateInfo, const DeviceFeatures &Features) noexcept(false)
 
void Diligent::CopyRTShaderGroupNames (std::unordered_map< HashMapStringKey, Uint32, HashMapStringKey::Hasher > &NameToGroupIndex, const RayTracingPipelineStateCreateInfo &CreateInfo, FixedLinearAllocator &MemPool) noexcept
 Copies ray tracing shader group names and also initializes the mapping from the group name to its index. More...
 
void Diligent::ValidatePipelineResourceCompatibility (const PipelineResourceDesc &ResDesc, SHADER_RESOURCE_TYPE Type, PIPELINE_RESOURCE_FLAGS ResourceFlags, Uint32 ArraySize, const char *ShaderName, const char *SignatureName) noexcept(false)
 Validates that pipeline resource description 'ResDesc' is compatible with the actual resource attributes and throws an exception in case of an error. More...
 
void Diligent::CorrectGraphicsPipelineDesc (GraphicsPipelineDesc &GraphicsPipeline) noexcept
 
Uint32 Diligent::FindPipelineResourceLayoutVariable (const PipelineResourceLayoutDesc &LayoutDesc, const char *Name, SHADER_TYPE ShaderStage, const char *CombinedSamplerSuffix)
 Finds a pipeline resource layout variable with the name 'Name' in shader stage 'ShaderStage' in the list of variables of 'LayoutDesc'. If CombinedSamplerSuffix != null, the variable is treated as a combined sampler and the suffix is added to the names of variables from 'LayoutDesc' when comparing with 'Name'. If the variable is found, returns its index in LayoutDesc.Variables. Otherwise returns InvalidPipelineResourceLayoutVariableIndex. More...
 

Macro Definition Documentation

◆ LOG_PSO_ERROR_AND_THROW

#define LOG_PSO_ERROR_AND_THROW (   ...)    LOG_ERROR_AND_THROW("Description of ", GetPipelineTypeString(PSODesc.PipelineType), " PSO '", (PSODesc.Name != nullptr ? PSODesc.Name : ""), "' is invalid: ", ##__VA_ARGS__)

◆ VALIDATE_SHADER_TYPE

#define VALIDATE_SHADER_TYPE (   Shader,
  ExpectedType,
  ShaderName 
)
Value:
if (Shader != nullptr && Shader->GetDesc().ShaderType != ExpectedType) \
{ \
LOG_ERROR_AND_THROW(GetShaderTypeLiteralName(Shader->GetDesc().ShaderType), " is not a valid type for ", ShaderName, " shader"); \
}
Diligent::GetShaderTypeLiteralName
const Char * GetShaderTypeLiteralName(SHADER_TYPE ShaderType)
Returns the literal name of a shader type. For instance, for a pixel shader, "SHADER_TYPE_PIXEL" will...
Definition: GraphicsAccessories.cpp:476