]> git.tdb.fi Git - libs/gl.git/commitdiff
Clear reflect data before adding shader stages
authorMikko Rasa <tdb@tdb.fi>
Mon, 11 Oct 2021 13:17:27 +0000 (16:17 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 11 Oct 2021 13:17:27 +0000 (16:17 +0300)
Otherwise it prevents the number of clip distances from being recorded.

source/core/program.cpp

index 4707f4c0416e2be185441efebe847e65ed49fd7a..1a7ac17b3e99325d33918cebff6593b4c257a989 100644 (file)
@@ -17,6 +17,8 @@ void Program::add_stages(const Module &mod, const map<string, int> &spec_values)
        if(has_stages())
                throw invalid_operation("Program::add_stages");
 
+       reflect_data = ReflectData();
+
        TransientData transient;
        switch(mod.get_format())
        {
@@ -30,8 +32,6 @@ void Program::add_stages(const Module &mod, const map<string, int> &spec_values)
                throw invalid_argument("Program::add_stages");
        }
 
-       reflect_data = ReflectData();
-
        finalize(mod);
 
        if(mod.get_format()==Module::GLSL)