Shader: Handle type as expressions

This commit is contained in:
Jérôme Leclercq
2022-02-08 17:03:34 +01:00
parent 5ce8120a0c
commit 402e16bd2b
53 changed files with 1746 additions and 1141 deletions

View File

@@ -78,7 +78,7 @@ namespace Nz::ShaderAst
}
template<typename T>
bool Compare(const AttributeValue<T>& lhs, const AttributeValue<T>& rhs)
bool Compare(const ExpressionValue<T>& lhs, const ExpressionValue<T>& rhs)
{
if (!Compare(lhs.HasValue(), rhs.HasValue()))
return false;
@@ -519,6 +519,14 @@ namespace Nz::ShaderAst
return true;
}
bool Compare(const ScopedStatement& lhs, const ScopedStatement& rhs)
{
if (!Compare(lhs.statement, rhs.statement))
return false;
return true;
}
inline bool Compare(const WhileStatement& lhs, const WhileStatement& rhs)
{
if (!Compare(lhs.unroll, rhs.unroll))