Shader: Add support for partial sanitization

This commit is contained in:
SirLynix
2022-03-25 12:54:51 +01:00
parent a54f70fd24
commit 8146ec251a
31 changed files with 1105 additions and 521 deletions

View File

@@ -15,10 +15,11 @@ namespace Nz::ShaderAst
void DependencyCheckerVisitor::Visit(CallFunctionExpression& node)
{
const auto& targetFuncType = GetExpressionType(*node.targetFunction);
assert(std::holds_alternative<FunctionType>(targetFuncType));
const ExpressionType* targetFuncType = GetExpressionType(*node.targetFunction);
assert(targetFuncType);
assert(std::holds_alternative<FunctionType>(*targetFuncType));
const auto& funcType = std::get<FunctionType>(targetFuncType);
const auto& funcType = std::get<FunctionType>(*targetFuncType);
assert(m_currentFunctionIndex);
if (m_currentVariableDeclIndex)