From f6afada5ec4ece09b2056b540dac70ee5be5a332 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 25 Feb 2021 22:34:36 -0800 Subject: Added PSO creation failure tests --- Graphics/GraphicsEngine/src/PipelineStateBase.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/src/PipelineStateBase.cpp b/Graphics/GraphicsEngine/src/PipelineStateBase.cpp index 85b7da0a..57fc1ae3 100644 --- a/Graphics/GraphicsEngine/src/PipelineStateBase.cpp +++ b/Graphics/GraphicsEngine/src/PipelineStateBase.cpp @@ -268,7 +268,8 @@ void ValidatePipelineResourceLayoutDesc(const PipelineStateDesc& PSODesc) noexce if ((it->second & Var.ShaderStages) != 0) { LOG_PSO_ERROR_AND_THROW("Shader variable '", Var.Name, "' is defined in overlapping shader stages (", GetShaderStagesString(Var.ShaderStages), - " and ", GetShaderStagesString(it->second), "), which is not allowed."); + " and ", GetShaderStagesString(it->second), + "). Multiple variables with the same name are allowed, but shader stages they use must not overlap."); } } UniqueVariables.emplace(Var.Name, Var.ShaderStages); @@ -286,7 +287,8 @@ void ValidatePipelineResourceLayoutDesc(const PipelineStateDesc& PSODesc) noexce if ((it->second & Sam.ShaderStages) != 0) { LOG_PSO_ERROR_AND_THROW("Immutable sampler '", Sam.SamplerOrTextureName, "' is defined in overlapping shader stages (", GetShaderStagesString(Sam.ShaderStages), - " and ", GetShaderStagesString(it->second), "), which is not allowed."); + " and ", GetShaderStagesString(it->second), + "). Multiple immutable samplers with the same name are allowed, but shader stages they use must not overlap."); } } UniqueSamplers.emplace(Sam.SamplerOrTextureName, Sam.ShaderStages); -- cgit v1.2.3