]> git.tdb.fi Git - libs/gl.git/commitdiff
Use forward references for entry point interfaces in SPIR-V
authorMikko Rasa <tdb@tdb.fi>
Sun, 25 Sep 2022 16:58:40 +0000 (19:58 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 25 Sep 2022 17:21:57 +0000 (20:21 +0300)
source/glsl/spirv.cpp

index b263fe87dcdb38dd76f037a5e189d344d5e6c960..404ffaf3735fe3f575ea62e8c93037095f78a781 100644 (file)
@@ -1832,7 +1832,7 @@ void SpirVGenerator::visit_entry_point(FunctionDeclaration &func, Id func_id)
        for(Node *n: dependencies)
                if(const VariableDeclaration *var = dynamic_cast<const VariableDeclaration *>(n))
                        if(!var->interface.empty())
-                               writer.write(get_id(*n));
+                               writer.write(allocate_forward_id(*n));
 
        writer.end_op(OP_ENTRY_POINT);