]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/validate.cpp
Handle descriptor sets when allocating uniform locations
[libs/gl.git] / source / glsl / validate.cpp
index 6a4b8eb0dc0e34ced99b82fcc08d41c22c569bf0..7d3d20d1c78eb104c85ac8ef511a099b5115ae5e 100644 (file)
@@ -834,6 +834,11 @@ void GlobalInterfaceValidator::check_uniform(const Uniform &uni)
                        error(*uni.node, format("Mismatched location %d for uniform '%s'", uni.location, uni.name));
                        add_info(*i->second->node, format("Previously declared here with location %d", i->second->location));
                }
+               if(i->second->desc_set!=uni.desc_set)
+               {
+                       error(*uni.node, format("Mismatched descriptor set %d for uniform '%s'", uni.desc_set, uni.name));
+                       add_info(*i->second->node, format("Previously declared here with descriptor set %d", i->second->desc_set));
+               }
                if(uni.bind_point>=0 && i->second->bind_point>=0 && i->second->bind_point!=uni.bind_point)
                {
                        error(*uni.node, format("Mismatched binding %d for uniform '%s'", uni.bind_point, uni.name));