diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-10-28 03:58:28 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-10-28 03:58:28 +0000 |
| commit | cbf6f3c8a7e1d4a370d4c9ca2840a143cfbea216 (patch) | |
| tree | 587e1bd262ad08c814a4c82032ce9a2ba05f6dbe /Graphics/GraphicsEngine | |
| parent | Fixed two minor merge issues (diff) | |
| download | DiligentCore-cbf6f3c8a7e1d4a370d4c9ca2840a143cfbea216.tar.gz DiligentCore-cbf6f3c8a7e1d4a370d4c9ca2840a143cfbea216.zip | |
ShaderResourceLayout{D3D12,Vk}: implemented GetShaderName
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp b/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp index 1130fbff..9fef2399 100644 --- a/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp +++ b/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp @@ -381,6 +381,28 @@ inline void VerifyAndCorrectSetArrayArguments(const char* Name, Uint32 ArraySize } } +template <typename ShaderVectorType> +std::string GetShaderGroupName(const ShaderVectorType& Shaders) +{ + std::string Name; + if (Shaders.size() == 1) + { + Name = Shaders[0]->GetDesc().Name; + } + else + { + Name = "{"; + for (size_t s = 0; s < Shaders.size(); ++s) + { + if (s > 0) + Name += ", "; + Name += Shaders[s]->GetDesc().Name; + } + Name += "}"; + } + return Name; +} + struct DefaultShaderVariableIDComparator { bool operator()(const INTERFACE_ID& IID) const |
