bool LocationAllocator::visit_uniform(const string &name, RefPtr<Layout> &layout)
{
- int desc_set = 0;
+ int desc_set = get_layout_value(layout.get(), "set");
int bind_point = get_layout_value(layout.get(), "binding");
if(features.target_api==VULKAN)
{
- desc_set = get_layout_value(layout.get(), "set");
if(desc_set<0 && bind_point>=0)
{
desc_set = 0;
if(desc_set>=0)
uniforms[name].desc_set = desc_set;
}
+ else if(desc_set>=0 && bind_point<0)
+ {
+ auto i = find_member(layout->qualifiers, string("set"), &Layout::Qualifier::name);
+ layout->qualifiers.erase(i);
+ }
if(bind_point>=0)
{