summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp22
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