From: Mikko Rasa Date: Wed, 10 Nov 2021 20:09:38 +0000 (+0200) Subject: Emit descriptor set decorations for interface blocks X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7a1056eb9f0c46b4f8b723f6e3f74e8166a45ab4;p=libs%2Fgl.git Emit descriptor set decorations for interface blocks --- diff --git a/source/glsl/spirv.cpp b/source/glsl/spirv.cpp index c9062efa..20345e20 100644 --- a/source/glsl/spirv.cpp +++ b/source/glsl/spirv.cpp @@ -1717,9 +1717,13 @@ void SpirVGenerator::visit(InterfaceBlock &iface) if(layout_ql) { - auto i = find_member(*layout_ql, string("binding"), &Layout::Qualifier::name); - if(i!=layout_ql->end()) - writer.write_op_decorate(block_id, DECO_BINDING, i->value); + for(const Layout::Qualifier &q: *layout_ql) + { + if(q.name=="set") + writer.write_op_decorate(block_id, DECO_DESCRIPTOR_SET, q.value); + else if(q.name=="binding") + writer.write_op_decorate(block_id, DECO_BINDING, q.value); + } } }