Shader: Add module ID (UUID)

This commit is contained in:
Jérôme Leclercq
2022-03-05 15:25:27 +01:00
parent 43ac86e85c
commit 53728200ac
9 changed files with 72 additions and 46 deletions

View File

@@ -48,15 +48,10 @@ namespace Nz
{
if (!stageFlags.Test(stage))
{
ShaderAst::Module dummyModule;
ShaderAst::Module dummyModule(100);
dummyModule.rootNode = ShaderBuilder::MultiStatement();
dummyModule.rootNode->statements.push_back(ShaderBuilder::DeclareFunction(stage, "main", {}, {}));
std::shared_ptr<ShaderAst::Module::Metadata> metadata = std::make_shared<ShaderAst::Module::Metadata>();
metadata->shaderLangVersion = 100;
dummyModule.metadata = std::move(metadata);
OpenGLShaderModule shaderModule(device, stage, dummyModule);
stageFlags |= shaderModule.Attach(m_program, pipelineLayout.GetBindingMapping());
}