Shader: Replace select_opt by const_select

This commit is contained in:
Jérôme Leclercq
2021-07-08 10:53:11 +02:00
parent 838063c8b6
commit d3e0d8a39f
21 changed files with 69 additions and 144 deletions

View File

@@ -82,20 +82,6 @@ namespace Nz::ShaderAst
m_expressionCategory = ExpressionCategory::RValue;
}
void ShaderAstValueCategory::Visit(SelectOptionExpression& node)
{
node.truePath->Visit(*this);
ExpressionCategory trueExprCategory = m_expressionCategory;
node.falsePath->Visit(*this);
ExpressionCategory falseExprCategory = m_expressionCategory;
if (trueExprCategory == ExpressionCategory::RValue || falseExprCategory == ExpressionCategory::RValue)
m_expressionCategory = ExpressionCategory::RValue;
else
m_expressionCategory = ExpressionCategory::LValue;
}
void ShaderAstValueCategory::Visit(SwizzleExpression& node)
{
node.expression->Visit(*this);