From: Mikko Rasa Date: Thu, 11 Nov 2021 11:34:59 +0000 (+0200) Subject: Remove default uniform block if it has no uniforms X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0bb6a7c62d3df696d007f121bb057ed97c17e4b1;p=libs%2Fgl.git Remove default uniform block if it has no uniforms --- diff --git a/source/core/program.cpp b/source/core/program.cpp index 66fbb7af..8e845562 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -108,6 +108,9 @@ void Program::collect_uniforms(const SpirVModule &mod) block.update_layout_hash(); } + if(reflect_data.uniform_blocks.front().uniforms.empty()) + reflect_data.uniform_blocks.erase(reflect_data.uniform_blocks.begin()); + reflect_data.update_layout_hash(); }