MCPcopy Create free account
hub / github.com/carbonengine/trinity / PrintTypeMSL

Function PrintTypeMSL

shadercompiler/OutputHLSL.cpp:428–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428void PrintTypeMSL( CodeStream& os, Type type )
429{
430 switch( type.storageClass )
431 {
432 case OP_EXTERN:
433 os << "extern ";
434 break;
435 //TODO
436#if 0
437 case OP_NOINTERPOLATION:
438 os << "nointerpolation ";
439 break;
440 case OP_PRECISE:
441 os << "precise ";
442 break;
443 case OP_SHARED:
444 os << "shared ";
445 break;
446#endif
447 case OP_GROUPSHARED:
448 // Already processed and mapped to AddressSpace::Threadgroup.
449 break;
450 case OP_STATIC:
451 os << "static ";
452 break;
453 //TODO
454#if 0
455 case OP_UNIFORM:
456 os << "uniform ";
457 break;
458#endif
459 case OP_VOLATILE:
460 os << "volatile ";
461 break;
462 }
463 if( type.modifier == OP_CONST )
464 {
465 os << "const ";
466 }
467 else if( type.modifier == OP_PACKOFFSET )
468 {
469 os << "packed_";
470 }
471 if( type.symbol )
472 {
473 os << type.symbol->name;
474 }
475 else
476 {
477 switch( type.builtInType )
478 {
479 case OP_BOOL:
480 os << "bool";
481 break;
482 case OP_INT:
483 os << "int";
484 break;
485 case OP_UINT:

Callers 1

OutputHLSL.cppFile · 0.85

Calls 2

MslTextureTemplateTypeFunction · 0.85
ToStringMethod · 0.45

Tested by

no test coverage detected