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

Function GetCBufferIndex

shadercompiler/ParserUtils.cpp:523–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523int GetCBufferIndex( const InlineString& name )
524{
525 if( strncmp( name.start, "PerFrameVS", 10 ) == 0 )
526 {
527 return 1;
528 }
529 else if( strncmp( name.start, "PerObjectPS", 11 ) == 0 )
530 {
531 return 4;
532 }
533 else if( strncmp( name.start, "PerFramePS", 10 ) == 0 )
534 {
535 return 2;
536 }
537 else if( !strncmp( name.start, "g_uiTransforms", 14 ) )
538 {
539 return 6;
540 }
541 else if( !strncmp( name.start, "Globals", 7 ) )
542 {
543 return 0;
544 }
545
546 return -1;
547}
548
549int GetCBufferIndex( const Symbol* symbol )
550{

Callers 5

CollectGlobalsFunction · 0.85
PatchRtShaderFunction · 0.85
PatchCBuffersFunction · 0.85

Calls 1

HasRegisterBindingFunction · 0.85

Tested by

no test coverage detected