]> git.tdb.fi Git - libs/gl.git/blob - source/glsl/generate.cpp
Follow type aliases in TypeResolver
[libs/gl.git] / source / glsl / generate.cpp
1 #include <msp/core/hash.h>
2 #include <msp/core/raii.h>
3 #include <msp/strings/lexicalcast.h>
4 #include "builtin.h"
5 #include "generate.h"
6
7 using namespace std;
8
9 namespace Msp {
10 namespace GL {
11 namespace SL {
12
13 void DeclarationCombiner::apply(Stage &stage)
14 {
15         stage.content.visit(*this);
16         NodeRemover().apply(stage, nodes_to_remove);
17 }
18
19 void DeclarationCombiner::visit(Block &block)
20 {
21         if(current_block)
22                 return;
23
24         TraversingVisitor::visit(block);
25 }
26
27 void DeclarationCombiner::visit(VariableDeclaration &var)
28 {
29         VariableDeclaration *&ptr = variables[var.name];
30         if(ptr)
31         {
32                 ptr->type = var.type;
33                 if(var.init_expression)
34                         ptr->init_expression = var.init_expression;
35                 if(var.layout)
36                 {
37                         if(ptr->layout)
38                         {
39                                 for(vector<Layout::Qualifier>::iterator i=var.layout->qualifiers.begin(); i!=var.layout->qualifiers.end(); ++i)
40                                 {
41                                         bool found = false;
42                                         for(vector<Layout::Qualifier>::iterator j=ptr->layout->qualifiers.begin(); (!found && j!=ptr->layout->qualifiers.end()); ++j)
43                                                 if(j->name==i->name)
44                                                 {
45                                                         j->has_value = i->value;
46                                                         j->value = i->value;
47                                                         found = true;
48                                                 }
49
50                                         if(!found)
51                                                 ptr->layout->qualifiers.push_back(*i);
52                                 }
53                         }
54                         else
55                                 ptr->layout = var.layout;
56                 }
57                 nodes_to_remove.insert(&var);
58         }
59         else
60                 ptr = &var;
61 }
62
63
64 ConstantSpecializer::ConstantSpecializer():
65         values(0)
66 { }
67
68 void ConstantSpecializer::apply(Stage &stage, const map<string, int> *v)
69 {
70         values = v;
71         stage.content.visit(*this);
72 }
73
74 void ConstantSpecializer::visit(VariableDeclaration &var)
75 {
76         bool specializable = false;
77         if(var.layout)
78         {
79                 vector<Layout::Qualifier> &qualifiers = var.layout->qualifiers;
80                 for(vector<Layout::Qualifier>::iterator i=qualifiers.begin(); i!=qualifiers.end(); ++i)
81                         if(i->name=="constant_id")
82                         {
83                                 specializable = true;
84                                 if(values)
85                                         qualifiers.erase(i);
86                                 else if(i->value==-1)
87                                         i->value = hash32(var.name)&0x7FFFFFFF;
88                                 break;
89                         }
90
91                 if(qualifiers.empty())
92                         var.layout = 0;
93         }
94
95         if(specializable && values)
96         {
97                 map<string, int>::const_iterator i = values->find(var.name);
98                 if(i!=values->end())
99                 {
100                         RefPtr<Literal> literal = new Literal;
101                         if(var.type=="bool")
102                                 literal->token = (i->second ? "true" : "false");
103                         else if(var.type=="int")
104                                 literal->token = lexical_cast<string>(i->second);
105                         var.init_expression = literal;
106                 }
107         }
108 }
109
110
111 void BlockHierarchyResolver::enter(Block &block)
112 {
113         block.parent = current_block;
114 }
115
116
117 TypeResolver::TypeResolver():
118         stage(0)
119 { }
120
121 void TypeResolver::apply(Stage &s)
122 {
123         stage = &s;
124         s.types.clear();
125         s.content.visit(*this);
126 }
127
128 TypeDeclaration *TypeResolver::resolve_type(const string &name)
129 {
130         map<string, TypeDeclaration *>::iterator i = stage->types.find(name);
131         if(i!=stage->types.end())
132         {
133                 map<TypeDeclaration *, TypeDeclaration *>::iterator j = alias_map.find(i->second);
134                 return (j!=alias_map.end() ? j->second : i->second);
135         }
136         else
137                 return 0;
138 }
139
140 void TypeResolver::visit(BasicTypeDeclaration &type)
141 {
142         type.base_type = resolve_type(type.base);
143
144         if(type.kind==BasicTypeDeclaration::VECTOR && type.base_type)
145                 if(BasicTypeDeclaration *basic_base = dynamic_cast<BasicTypeDeclaration *>(type.base_type))
146                         if(basic_base->kind==BasicTypeDeclaration::VECTOR)
147                         {
148                                 type.kind = BasicTypeDeclaration::MATRIX;
149                                 type.size |= basic_base->size<<16;
150                         }
151
152         if(type.kind==BasicTypeDeclaration::ALIAS && type.base_type)
153                 alias_map[&type] = type.base_type;
154
155         stage->types.insert(make_pair(type.name, &type));
156 }
157
158 void TypeResolver::visit(ImageTypeDeclaration &type)
159 {
160         type.base_type = resolve_type(type.base);
161         stage->types.insert(make_pair(type.name, &type));
162 }
163
164 void TypeResolver::visit(StructDeclaration &strct)
165 {
166         stage->types.insert(make_pair(strct.name, &strct));
167         TraversingVisitor::visit(strct);
168 }
169
170 void TypeResolver::visit(VariableDeclaration &var)
171 {
172         var.type_declaration = resolve_type(var.type);
173 }
174
175 void TypeResolver::visit(FunctionDeclaration &func)
176 {
177         func.return_type_declaration = resolve_type(func.return_type);
178         TraversingVisitor::visit(func);
179 }
180
181
182 VariableResolver::VariableResolver():
183         stage(0),
184         r_members(0),
185         record_target(false),
186         r_self_referencing(false),
187         r_assignment_target(0)
188 { }
189
190 void VariableResolver::apply(Stage &s)
191 {
192         stage = &s;
193         s.interface_blocks.clear();
194         s.content.visit(*this);
195 }
196
197 void VariableResolver::enter(Block &block)
198 {
199         block.variables.clear();
200 }
201
202 void VariableResolver::visit(VariableReference &var)
203 {
204         var.declaration = 0;
205         r_members = 0;
206         /* Look for variable declarations in the block hierarchy first.  Interface
207         blocks are always defined in the top level so we can't accidentally skip
208         one. */
209         for(Block *block=current_block; (!var.declaration && block); block=block->parent)
210         {
211                 map<string, VariableDeclaration *>::iterator i = block->variables.find(var.name);
212                 if(i!=block->variables.end())
213                         var.declaration = i->second;
214         }
215
216         if(!var.declaration)
217         {
218                 const map<string, InterfaceBlock *> &blocks = stage->interface_blocks;
219                 map<string, InterfaceBlock *>::const_iterator i = blocks.find("_"+var.name);
220                 if(i!=blocks.end())
221                 {
222                         /* The name refers to an interface block with an instance name rather
223                         than a variable.  Prepare a new syntax tree node accordingly. */
224                         r_iface_ref = new InterfaceBlockReference;
225                         r_iface_ref->source = var.source;
226                         r_iface_ref->line = var.line;
227                         r_iface_ref->name = var.name;
228                         r_iface_ref->declaration = i->second;
229                         r_members = &i->second->members.variables;
230                 }
231                 else
232                 {
233                         // Look for the variable in anonymous interface blocks.
234                         for(i=blocks.begin(); (!var.declaration && i!=blocks.end()); ++i)
235                                 if(i->second->instance_name.empty())
236                                 {
237                                         map<string, VariableDeclaration *>::iterator j = i->second->members.variables.find(var.name);
238                                         if(j!=i->second->members.variables.end())
239                                                 var.declaration = j->second;
240                                 }
241                 }
242         }
243
244         if(var.declaration)
245                 if(StructDeclaration *strct = dynamic_cast<StructDeclaration *>(var.declaration->type_declaration))
246                         r_members = &strct->members.variables;
247
248         if(record_target)
249         {
250                 if(r_assignment_target)
251                 {
252                         /* More than one variable reference found in assignment target.
253                         Unable to determine what the primary target is. */
254                         record_target = false;
255                         r_assignment_target = 0;
256                 }
257                 else
258                         r_assignment_target = var.declaration;
259         }
260         else if(var.declaration && var.declaration==r_assignment_target)
261                 r_self_referencing = true;
262 }
263
264 void VariableResolver::visit(InterfaceBlockReference &iface)
265 {
266         iface.declaration = 0;
267         for(Block *block=current_block; block; block=block->parent)
268         {
269                 map<string, InterfaceBlock *>::iterator i = stage->interface_blocks.find("_"+iface.name);
270                 if(i!=stage->interface_blocks.end())
271                 {
272                         iface.declaration = i->second;
273                         r_members = &i->second->members.variables;
274                         break;
275                 }
276         }
277 }
278
279 void VariableResolver::visit(MemberAccess &memacc)
280 {
281         r_members = 0;
282         r_iface_ref = 0;
283         memacc.left->visit(*this);
284
285         if(r_iface_ref)
286                 memacc.left = r_iface_ref;
287         r_iface_ref = 0;
288
289         memacc.declaration = 0;
290         if(r_members)
291         {
292                 map<string, VariableDeclaration *>::iterator i = r_members->find(memacc.member);
293                 if(i!=r_members->end())
294                 {
295                         memacc.declaration = i->second;
296                         if(StructDeclaration *strct = dynamic_cast<StructDeclaration *>(i->second->type_declaration))
297                                 r_members = &strct->members.variables;
298                 }
299                 else
300                         r_members = 0;
301         }
302 }
303
304 void VariableResolver::visit(UnaryExpression &unary)
305 {
306         TraversingVisitor::visit(unary);
307         r_members = 0;
308         r_iface_ref = 0;
309 }
310
311 void VariableResolver::visit(BinaryExpression &binary)
312 {
313         if(binary.oper->token[0]=='[')
314         {
315                 {
316                         /* The subscript expression is not a part of the primary assignment
317                         target. */
318                         SetFlag set(record_target, false);
319                         binary.right->visit(*this);
320                 }
321                 r_members = 0;
322                 r_iface_ref = 0;
323                 binary.left->visit(*this);
324                 if(r_iface_ref)
325                         binary.left = r_iface_ref;
326         }
327         else
328         {
329                 TraversingVisitor::visit(binary);
330                 r_members = 0;
331         }
332
333         r_iface_ref = 0;
334 }
335
336 void VariableResolver::visit(Assignment &assign)
337 {
338         {
339                 SetFlag set(record_target);
340                 r_assignment_target = 0;
341                 assign.left->visit(*this);
342                 assign.target_declaration = r_assignment_target;
343         }
344
345         r_self_referencing = false;
346         assign.right->visit(*this);
347         assign.self_referencing = (r_self_referencing || assign.oper->token[0]!='=');
348
349         r_members = 0;
350         r_iface_ref = 0;
351 }
352
353 void VariableResolver::visit(FunctionCall &call)
354 {
355         TraversingVisitor::visit(call);
356         r_members = 0;
357         r_iface_ref = 0;
358 }
359
360 void VariableResolver::visit(VariableDeclaration &var)
361 {
362         if(!block_interface.empty() && var.interface.empty())
363                 var.interface = block_interface;
364
365         TraversingVisitor::visit(var);
366         current_block->variables.insert(make_pair(var.name, &var));
367 }
368
369 void VariableResolver::visit(InterfaceBlock &iface)
370 {
371         /* Block names can be reused in different interfaces.  Prefix the name with
372         the first character of the interface to avoid conflicts. */
373         stage->interface_blocks.insert(make_pair(iface.interface+iface.name, &iface));
374         if(!iface.instance_name.empty())
375                 stage->interface_blocks.insert(make_pair("_"+iface.instance_name, &iface));
376
377         SetForScope<string> set_iface(block_interface, iface.interface);
378         TraversingVisitor::visit(iface);
379 }
380
381
382 void FunctionResolver::apply(Stage &s)
383 {
384         stage = &s;
385         s.functions.clear();
386         s.content.visit(*this);
387 }
388
389 void FunctionResolver::visit(FunctionCall &call)
390 {
391         map<string, FunctionDeclaration *>::iterator i = stage->functions.find(call.name);
392         if(i!=stage->functions.end())
393                 call.declaration = i->second;
394
395         TraversingVisitor::visit(call);
396 }
397
398 void FunctionResolver::visit(FunctionDeclaration &func)
399 {
400         FunctionDeclaration *&stage_decl = stage->functions[func.name];
401         vector<FunctionDeclaration *> &decls = declarations[func.name];
402         if(func.definition==&func)
403         {
404                 stage_decl = &func;
405
406                 // Set all previous declarations to use this definition.
407                 for(vector<FunctionDeclaration *>::iterator i=decls.begin(); i!=decls.end(); ++i)
408                 {
409                         (*i)->definition = func.definition;
410                         (*i)->body.body.clear();
411                 }
412         }
413         else
414         {
415                 func.definition = 0;
416                 if(!stage_decl)
417                         stage_decl = &func;
418                 else
419                         func.definition = stage_decl->definition;
420         }
421         decls.push_back(&func);
422
423         TraversingVisitor::visit(func);
424 }
425
426
427 InterfaceGenerator::InterfaceGenerator():
428         stage(0),
429         function_scope(false),
430         iface_block(0),
431         copy_block(false),
432         iface_target_block(0)
433 { }
434
435 string InterfaceGenerator::get_out_prefix(Stage::Type type)
436 {
437         if(type==Stage::VERTEX)
438                 return "_vs_out_";
439         else if(type==Stage::GEOMETRY)
440                 return "_gs_out_";
441         else
442                 return string();
443 }
444
445 void InterfaceGenerator::apply(Stage &s)
446 {
447         stage = &s;
448         iface_target_block = &stage->content;
449         if(stage->previous)
450                 in_prefix = get_out_prefix(stage->previous->type);
451         out_prefix = get_out_prefix(stage->type);
452         s.content.visit(*this);
453         NodeRemover().apply(s, nodes_to_remove);
454 }
455
456 void InterfaceGenerator::visit(Block &block)
457 {
458         SetForScope<Block *> set_block(current_block, &block);
459         for(NodeList<Statement>::iterator i=block.body.begin(); i!=block.body.end(); ++i)
460         {
461                 assignment_insert_point = i;
462                 if(&block==&stage->content)
463                         iface_insert_point = i;
464
465                 (*i)->visit(*this);
466         }
467 }
468
469 string InterfaceGenerator::change_prefix(const string &name, const string &prefix) const
470 {
471         unsigned offset = (name.compare(0, in_prefix.size(), in_prefix) ? 0 : in_prefix.size());
472         return prefix+name.substr(offset);
473 }
474
475 VariableDeclaration *InterfaceGenerator::generate_interface(VariableDeclaration &var, const string &iface, const string &name)
476 {
477         if(stage->content.variables.count(name))
478                 return 0;
479
480         VariableDeclaration* iface_var = new VariableDeclaration;
481         iface_var->sampling = var.sampling;
482         iface_var->interface = iface;
483         iface_var->type = var.type;
484         iface_var->name = name;
485         /* Geometry shader inputs are always arrays.  But if we're bringing in an
486         entire block, the array is on the block and not individual variables. */
487         if(stage->type==Stage::GEOMETRY && !copy_block)
488                 iface_var->array = ((var.array && var.interface!="in") || iface=="in");
489         else
490                 iface_var->array = var.array;
491         if(iface_var->array)
492                 iface_var->array_size = var.array_size;
493         if(iface=="in")
494         {
495                 iface_var->layout = var.layout;
496                 iface_var->linked_declaration = &var;
497                 var.linked_declaration = iface_var;
498         }
499
500         iface_target_block->body.insert(iface_insert_point, iface_var);
501         iface_target_block->variables.insert(make_pair(name, iface_var));
502
503         return iface_var;
504 }
505
506 InterfaceBlock *InterfaceGenerator::generate_interface(InterfaceBlock &out_block)
507 {
508         if(stage->interface_blocks.count("in"+out_block.name))
509                 return 0;
510
511         InterfaceBlock *in_block = new InterfaceBlock;
512         in_block->interface = "in";
513         in_block->name = out_block.name;
514         in_block->instance_name = out_block.instance_name;
515         if(stage->type==Stage::GEOMETRY)
516                 in_block->array = true;
517         else
518                 in_block->array = out_block.array;
519         in_block->linked_block = &out_block;
520         out_block.linked_block = in_block;
521
522         {
523                 SetFlag set_copy(copy_block, true);
524                 SetForScope<Block *> set_target(iface_target_block, &in_block->members);
525                 SetForScope<NodeList<Statement>::iterator> set_ins_pt(iface_insert_point, in_block->members.body.end());
526                 out_block.members.visit(*this);
527         }
528
529         iface_target_block->body.insert(iface_insert_point, in_block);
530         stage->interface_blocks.insert(make_pair("in"+in_block->name, in_block));
531         if(!in_block->instance_name.empty())
532                 stage->interface_blocks.insert(make_pair("_"+in_block->instance_name, in_block));
533
534         SetFlag set_scope(function_scope, false);
535         SetForScope<Block *> set_block(current_block, &stage->content);
536         in_block->visit(*this);
537
538         return in_block;
539 }
540
541 ExpressionStatement &InterfaceGenerator::insert_assignment(const string &left, Expression *right)
542 {
543         Assignment *assign = new Assignment;
544         VariableReference *ref = new VariableReference;
545         ref->name = left;
546         assign->left = ref;
547         assign->oper = &Operator::get_operator("=", Operator::BINARY);
548         assign->right = right;
549
550         ExpressionStatement *stmt = new ExpressionStatement;
551         stmt->expression = assign;
552         current_block->body.insert(assignment_insert_point, stmt);
553         stmt->visit(*this);
554
555         return *stmt;
556 }
557
558 void InterfaceGenerator::visit(VariableReference &var)
559 {
560         if(var.declaration || !stage->previous)
561                 return;
562         /* Don't pull a variable from previous stage if we just generated an output
563         interface in this stage */
564         if(stage->content.variables.count(var.name))
565                 return;
566
567         const map<string, VariableDeclaration *> &prev_vars = stage->previous->content.variables;
568         map<string, VariableDeclaration *>::const_iterator i = prev_vars.find(var.name);
569         if(i==prev_vars.end() || i->second->interface!="out")
570                 i = prev_vars.find(in_prefix+var.name);
571         if(i!=prev_vars.end() && i->second->interface=="out")
572         {
573                 generate_interface(*i->second, "in", i->second->name);
574                 var.name = i->second->name;
575                 return;
576         }
577
578         const map<string, InterfaceBlock *> &prev_blocks = stage->previous->interface_blocks;
579         map<string, InterfaceBlock *>::const_iterator j = prev_blocks.find("_"+var.name);
580         if(j!=prev_blocks.end() && j->second->interface=="out")
581         {
582                 generate_interface(*j->second);
583                 /* Let VariableResolver convert the variable reference into an interface
584                 block reference. */
585                 return;
586         }
587
588         for(j=prev_blocks.begin(); j!=prev_blocks.end(); ++j)
589                 if(j->second->instance_name.empty())
590                 {
591                         i = j->second->members.variables.find(var.name);
592                         if(i!=j->second->members.variables.end())
593                         {
594                                 generate_interface(*j->second);
595                                 return;
596                         }
597                 }
598 }
599
600 void InterfaceGenerator::visit(VariableDeclaration &var)
601 {
602         if(copy_block)
603         {
604                 generate_interface(var, "in", var.name);
605                 return;
606         }
607
608         if(iface_block)
609         {
610                 if(iface_block->linked_block)
611                 {
612                         // Link all variables to their counterparts in the linked block.
613                         const map<string, VariableDeclaration *> &linked_vars = iface_block->linked_block->members.variables;
614                         map<string, VariableDeclaration *>::const_iterator i = linked_vars.find(var.name);
615                         if(i!=linked_vars.end())
616                         {
617                                 var.linked_declaration = i->second;
618                                 var.linked_declaration->linked_declaration = &var;
619                         }
620                 }
621                 return;
622         }
623
624         if(var.interface=="out")
625         {
626                 /* For output variables in function scope, generate a global interface
627                 and replace the local declaration with an assignment. */
628                 VariableDeclaration *out_var = 0;
629                 if(function_scope && (out_var=generate_interface(var, "out", var.name)))
630                 {
631                         out_var->source = var.source;
632                         out_var->line = var.line;
633                         nodes_to_remove.insert(&var);
634                         if(var.init_expression)
635                         {
636                                 ExpressionStatement &stmt = insert_assignment(var.name, var.init_expression->clone());
637                                 stmt.source = var.source;
638                                 stmt.line = var.line;
639                                 return;
640                         }
641                 }
642         }
643         else if(var.interface=="in")
644         {
645                 /* Try to link input variables in global scope with output variables from
646                 previous stage. */
647                 if(current_block==&stage->content && !var.linked_declaration && stage->previous)
648                 {
649                         const map<string, VariableDeclaration *> &prev_vars = stage->previous->content.variables;
650                         map<string, VariableDeclaration *>::const_iterator i = prev_vars.find(var.name);
651                         if(i!=prev_vars.end() && i->second->interface=="out")
652                         {
653                                 var.linked_declaration = i->second;
654                                 i->second->linked_declaration = &var;
655                         }
656                 }
657         }
658
659         TraversingVisitor::visit(var);
660 }
661
662 void InterfaceGenerator::visit(InterfaceBlock &iface)
663 {
664         if(iface.interface=="in")
665         {
666                 /* Try to link input blocks with output blocks sharing the same block
667                 name from previous stage. */
668                 if(!iface.linked_block && stage->previous)
669                 {
670                         const map<string, InterfaceBlock *> &prev_blocks = stage->previous->interface_blocks;
671                         map<string, InterfaceBlock *>::const_iterator i = prev_blocks.find("out"+iface.name);
672                         if(i!=prev_blocks.end())
673                         {
674                                 iface.linked_block = i->second;
675                                 i->second->linked_block = &iface;
676                         }
677                 }
678         }
679
680         SetForScope<InterfaceBlock *> set_iface(iface_block, &iface);
681         TraversingVisitor::visit(iface);
682 }
683
684 void InterfaceGenerator::visit(FunctionDeclaration &func)
685 {
686         SetFlag set_scope(function_scope, true);
687         // Skip parameters because they're not useful here
688         func.body.visit(*this);
689 }
690
691 void InterfaceGenerator::visit(Passthrough &pass)
692 {
693         vector<VariableDeclaration *> pass_vars;
694
695         // Pass through all input variables of this stage.
696         for(map<string, VariableDeclaration *>::const_iterator i=stage->content.variables.begin(); i!=stage->content.variables.end(); ++i)
697                 if(i->second->interface=="in")
698                         pass_vars.push_back(i->second);
699
700         if(stage->previous)
701         {
702                 const map<string, VariableDeclaration *> &prev_vars = stage->previous->content.variables;
703                 for(map<string, VariableDeclaration *>::const_iterator i=prev_vars.begin(); i!=prev_vars.end(); ++i)
704                 {
705                         if(i->second->interface!="out")
706                                 continue;
707
708                         /* Pass through output variables from the previous stage, but only
709                         those which are not already linked to an input here. */
710                         if(!i->second->linked_declaration && generate_interface(*i->second, "in", i->second->name))
711                                 pass_vars.push_back(i->second);
712                 }
713         }
714
715         if(stage->type==Stage::GEOMETRY)
716         {
717                 /* Special case for geometry shader: copy gl_Position from input to
718                 output. */
719                 InterfaceBlockReference *ref = new InterfaceBlockReference;
720                 ref->name = "gl_in";
721
722                 BinaryExpression *subscript = new BinaryExpression;
723                 subscript->left = ref;
724                 subscript->oper = &Operator::get_operator("[", Operator::BINARY);
725                 subscript->right = pass.subscript;
726
727                 MemberAccess *memacc = new MemberAccess;
728                 memacc->left = subscript;
729                 memacc->member = "gl_Position";
730
731                 insert_assignment("gl_Position", memacc);
732         }
733
734         for(vector<VariableDeclaration *>::const_iterator i=pass_vars.begin(); i!=pass_vars.end(); ++i)
735         {
736                 string out_name = change_prefix((*i)->name, out_prefix);
737                 generate_interface(**i, "out", out_name);
738
739                 VariableReference *ref = new VariableReference;
740                 ref->name = (*i)->name;
741                 if(pass.subscript)
742                 {
743                         BinaryExpression *subscript = new BinaryExpression;
744                         subscript->left = ref;
745                         subscript->oper = &Operator::get_operator("[", Operator::BINARY);
746                         subscript->right = pass.subscript;
747                         insert_assignment(out_name, subscript);
748                 }
749                 else
750                         insert_assignment(out_name, ref);
751         }
752
753         nodes_to_remove.insert(&pass);
754 }
755
756 } // namespace SL
757 } // namespace GL
758 } // namespace Msp