]> git.tdb.fi Git - libs/gl.git/commitdiff
Always remove location qualifier if not supported
authorMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 18:02:21 +0000 (21:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 18:02:21 +0000 (21:02 +0300)
source/glsl/compatibility.cpp

index 193ae123fae31126b6b23d740df12cd55a9fa6d2..280a38c9f2c829443991da07f5d6d6713db190a9 100644 (file)
@@ -286,12 +286,10 @@ void LegacyConverter::visit(VariableDeclaration &var)
                        else if(stage->type==Stage::FRAGMENT && var.interface=="out")
                        {
                                if(check_extension(&Features::ext_gpu_shader4))
                        else if(stage->type==Stage::FRAGMENT && var.interface=="out")
                        {
                                if(check_extension(&Features::ext_gpu_shader4))
-                               {
                                        stage->locations[var.name] = i->value;
                                        stage->locations[var.name] = i->value;
-                                       var.layout->qualifiers.erase(i);
-                               }
                                else if(i->value!=0)
                                        unsupported("EXT_gpu_shader4 required for multiple fragment shader outputs");
                                else if(i->value!=0)
                                        unsupported("EXT_gpu_shader4 required for multiple fragment shader outputs");
+                               var.layout->qualifiers.erase(i);
                        }
 
                        if(var.layout->qualifiers.empty())
                        }
 
                        if(var.layout->qualifiers.empty())