Shader: Add EliminateUnusedPassVisitor and use it when optimizing

This commit is contained in:
Jérôme Leclercq
2022-02-18 13:06:47 +01:00
parent ebd1318512
commit 3f7815175b
12 changed files with 407 additions and 30 deletions

View File

@@ -0,0 +1,17 @@
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Shader module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Shader/Ast/EliminateUnusedPassVisitor.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst
{
inline StatementPtr EliminateUnusedPass(Statement& ast)
{
EliminateUnusedPassVisitor visitor;
return visitor.Process(ast);
}
}
#include <Nazara/Shader/DebugOff.hpp>