]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix a memory error with interface blocks
authorMikko Rasa <tdb@tdb.fi>
Thu, 4 Mar 2021 23:50:31 +0000 (01:50 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 23:00:31 +0000 (01:00 +0200)
The changes in d72d8a9 were not applied to the interfaces map of the
stage, but because those interfaces were unused anyway it only showed
up when doing an AST dump.

source/glsl/visitor.cpp

index bee312fd187d333fd94ef529d81d5fa489898f58..dad8baddce0c5a5bd74c1b56c4abeb4a93d48fd9 100644 (file)
@@ -177,9 +177,9 @@ void NodeRemover::visit(InterfaceBlock &iface)
 {
        if(to_remove->count(&iface))
        {
-               remove_from_map(stage->interface_blocks, iface.name, iface);
+               remove_from_map(stage->interface_blocks, iface.interface+iface.name, iface);
                if(!iface.instance_name.empty())
-                       remove_from_map(stage->interface_blocks, iface.instance_name, iface);
+                       remove_from_map(stage->interface_blocks, "_"+iface.instance_name, iface);
        }
        SetFlag set_recursive(recursive_remove, recursive_remove || to_remove->count(&iface));
        TraversingVisitor::visit(iface);