]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.cpp
Add a backend for SpirVModule and make it non-copyable
[libs/gl.git] / source / core / module.cpp
index 15bd750cf0b299bd7ea8440ed6d0be5adc3788d1..4eefc0347494ecadb077e8b0bc8a984688b08464 100644 (file)
@@ -96,41 +96,6 @@ void GlslModule::compile(SL::Compiler &compiler)
 }
 
 
-SpirVModule::SpirVModule(const SpirVModule &other):
-       code(other.code),
-       entry_points(other.entry_points),
-       structs(other.structs),
-       variables(other.variables)
-{
-       remap_pointers_from(other);
-}
-
-SpirVModule &SpirVModule::operator=(const SpirVModule &other)
-{
-       code = other.code;
-       entry_points = other.entry_points;
-       structs = other.structs;
-       variables = other.variables;
-       remap_pointers_from(other);
-       return *this;
-}
-
-void SpirVModule::remap_pointers_from(const SpirVModule &other)
-{
-       for(EntryPoint &e: entry_points)
-               for(const Variable *&v: e.globals)
-                       v = &variables[v-&other.variables.front()];
-
-       for(Variable &v: variables)
-               if(v.struct_type)
-                       v.struct_type = &structs[v.struct_type-&other.structs.front()];
-
-       for(Structure &s: structs)
-               for(StructMember &m: s.members)
-                       if(m.struct_type)
-                               m.struct_type = &structs[m.struct_type-&other.structs.front()];
-}
-
 void SpirVModule::load_code(IO::Base &io)
 {
        uint32_t buffer[1024];