]> git.tdb.fi Git - libs/gl.git/commitdiff
Collect uniforms which have a binding, even if they have no location
authorMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:30:35 +0000 (15:30 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:30:35 +0000 (15:30 +0200)
source/core/program.cpp

index fdbfa6d4be08004f38be801c3a46c69ae0745b04..bc61e1db7173f141f609a346b180bc51675dc375 100644 (file)
@@ -147,7 +147,7 @@ void Program::collect_uniforms(const SpirVModule &mod, const vector<uint8_t> &us
                        block_uniform_names.push_back(vector<string>());
                        collect_block_uniforms(*v.struct_type, prefix, 0, block_uniform_names.back());
                }
-               else if(v.storage==SpirVModule::UNIFORM_CONSTANT && v.location>=0)
+               else if(v.storage==SpirVModule::UNIFORM_CONSTANT && (v.location>=0 || v.binding>=0))
                {
                        block_uniform_names[0].push_back(v.name);
                        reflect_data.uniforms.push_back(ReflectData::UniformInfo());