Shader: Add function parameters and return handling

This commit is contained in:
Jérôme Leclercq
2021-02-28 17:50:32 +01:00
parent 9a0f201433
commit b320b5b44e
39 changed files with 818 additions and 327 deletions

View File

@@ -18,6 +18,7 @@ namespace Nz
template<class... Ts> overloaded(Ts...)->overloaded<Ts...>;
}
struct SpirvConstantCache::Eq
{
bool Compare(const ConstantBool& lhs, const ConstantBool& rhs) const
@@ -353,6 +354,12 @@ namespace Nz
}, v);
}
void Register(const std::vector<TypePtr>& lhs)
{
for (std::size_t i = 0; i < lhs.size(); ++i)
cache.Register(*lhs[i]);
}
template<typename T>
void Register(const std::vector<T>& lhs)
{