diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-12-23 05:10:14 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-12-23 05:10:14 +0000 |
| commit | 0715a8e343429e2536cf887823f7439ce2ea6211 (patch) | |
| tree | 28e5cdf7ea5edbb2b98184a16a1d1693414858a4 /Graphics/GraphicsEngine | |
| parent | Fixed some issues with PSO create info validation (diff) | |
| download | DiligentCore-0715a8e343429e2536cf887823f7439ce2ea6211.tar.gz DiligentCore-0715a8e343429e2536cf887823f7439ce2ea6211.zip | |
Fixed few more issues in PSO create info validation
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/src/PipelineStateBase.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngine/src/PipelineStateBase.cpp b/Graphics/GraphicsEngine/src/PipelineStateBase.cpp index f7e4048d..f99b3a0f 100644 --- a/Graphics/GraphicsEngine/src/PipelineStateBase.cpp +++ b/Graphics/GraphicsEngine/src/PipelineStateBase.cpp @@ -34,7 +34,7 @@ namespace Diligent { -#define LOG_PSO_ERROR_AND_THROW(...) LOG_ERROR_AND_THROW("Description of ", GetPipelineTypeString(PSODesc.PipelineType), " PSO '", PSODesc.Name, "' is invalid: ", ##__VA_ARGS__) +#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__) namespace { @@ -179,14 +179,14 @@ void ValidateGraphicsPipelineCreateInfo(const GraphicsPipelineStateCreateInfo& C if (PSODesc.PipelineType == PIPELINE_TYPE_GRAPHICS) { if (CreateInfo.pVS == nullptr) - LOG_ERROR_AND_THROW("Vertex shader must not be null."); + LOG_PSO_ERROR_AND_THROW("Vertex shader must not be null."); DEV_CHECK_ERR(CreateInfo.pAS == nullptr && CreateInfo.pMS == nullptr, "Mesh shaders are not supported in graphics pipeline."); } else if (PSODesc.PipelineType == PIPELINE_TYPE_MESH) { if (CreateInfo.pMS == nullptr) - LOG_ERROR_AND_THROW("Mesh shader must not be null."); + LOG_PSO_ERROR_AND_THROW("Mesh shader must not be null."); DEV_CHECK_ERR(CreateInfo.pVS == nullptr && CreateInfo.pGS == nullptr && CreateInfo.pDS == nullptr && CreateInfo.pHS == nullptr, "Vertex, geometry and tessellation shaders are not supported in a mesh pipeline."); |
