Shader: Attribute can now have expressions as values and struct fields can be conditionally supported

This commit is contained in:
Jérôme Leclercq
2021-07-07 11:41:58 +02:00
parent 749b40cb31
commit f9af35b489
36 changed files with 945 additions and 600 deletions

View File

@@ -25,12 +25,12 @@ namespace Nz
RegisterVariable(varIndex, m_writer.GetTypeId(type), pointerId, storageClass);
}
inline void SpirvAstVisitor::RegisterStruct(std::size_t structIndex, ShaderAst::StructDescription structDesc)
inline void SpirvAstVisitor::RegisterStruct(std::size_t structIndex, ShaderAst::StructDescription* structDesc)
{
if (structIndex >= m_structs.size())
m_structs.resize(structIndex + 1);
m_structs[structIndex] = std::move(structDesc);
m_structs[structIndex] = structDesc;
}
inline void SpirvAstVisitor::RegisterVariable(std::size_t varIndex, UInt32 typeId, UInt32 pointerId, SpirvStorageClass storageClass)