]> git.tdb.fi Git - libs/gl.git/commitdiff
Disallow the descriptor set qualifier for now
authorMikko Rasa <tdb@tdb.fi>
Sat, 3 Apr 2021 14:11:34 +0000 (17:11 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 3 Apr 2021 16:40:26 +0000 (19:40 +0300)
It's only meaningful for Vulkan, which isn't implemented yet

source/glsl/validate.cpp

index 889eee221b265ca98788fcd8dd73a8db22b76f64..7235e2237a81493fec5f31352874bc5ebc2e7f41 100644 (file)
@@ -70,6 +70,12 @@ void DeclarationValidator::visit(Layout &layout)
                        allowed = (variable && scope==GLOBAL);
                else if(i->name=="binding" || i->name=="set")
                {
+                       if(i->name=="set")
+                       {
+                               error(layout, "Layout qualifier 'set' not allowed when targeting OpenGL");
+                               continue;
+                       }
+
                        if(variable)
                        {
                                TypeDeclaration *type = variable->type_declaration;