yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
a5e6ddd00
master
1#include "slang-decoder.h" 2 3#include "../util/record-utility.h" 4#include "decoder-helper.h" 5#include "parameter-decoder.h" 6 7namespace SlangRecord 8{ 9 10bool SlangDecoder ::processMethodCall ( 11FunctionHeader const & header , 12ParameterBlock const & parameterBlock ) 13{ 14ApiClassId classId = static_cast < ApiClassId > (getClassId (header .callId )); 15ObjectID objectId = header .handleId ; 16switch (classId ) 17 { 18default : 19slangRecordLog (LogLevel ::Error ,"Unhandled Slang Class Id: %d\n" ,classId ); 20return false; 21case ApiClassId ::Class_IGlobalSession : 22return processIGlobalSessionMethods (header .callId ,objectId ,parameterBlock ); 23break ; 24case ApiClassId ::Class_ISession : 25return processISessionMethods (header .callId ,objectId ,parameterBlock ); 26break ; 27case ApiClassId ::Class_IModule : 28return processIModuleMethods (header .callId ,objectId ,parameterBlock ); 29break ; 30case ApiClassId ::Class_IEntryPoint : 31return processIEntryPointMethods (header .callId ,objectId ,parameterBlock ); 32break ; 33case ApiClassId ::Class_ICompositeComponentType : 34return processICompositeComponentTypeMethods (header .callId ,objectId ,parameterBlock ); 35break ; 36case ApiClassId ::Class_ITypeConformance : 37return processITypeConformanceMethods (header .callId ,objectId ,parameterBlock ); 38break ; 39 } 40} 41 42bool SlangDecoder ::processIGlobalSessionMethods ( 43ApiCallId callId , 44ObjectID objectId , 45ParameterBlock const & parameterBlock ) 46{ 47switch (callId ) 48 { 49default : 50slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,callId ); 51break ; 52case ApiCallId ::IGlobalSession_createSession : 53IGlobalSession_createSession (objectId ,parameterBlock ); 54break ; 55case ApiCallId ::IGlobalSession_findProfile : 56IGlobalSession_findProfile (objectId ,parameterBlock ); 57break ; 58case ApiCallId ::IGlobalSession_setDownstreamCompilerPath : 59IGlobalSession_setDownstreamCompilerPath (objectId ,parameterBlock ); 60break ; 61case ApiCallId ::IGlobalSession_setDownstreamCompilerPrelude : 62IGlobalSession_setDownstreamCompilerPrelude (objectId ,parameterBlock ); 63break ; 64case ApiCallId ::IGlobalSession_getDownstreamCompilerPrelude : 65IGlobalSession_getDownstreamCompilerPrelude (objectId ,parameterBlock ); 66break ; 67case ApiCallId ::IGlobalSession_getBuildTagString : 68IGlobalSession_getBuildTagString (objectId ,parameterBlock ); 69break ; 70case ApiCallId ::IGlobalSession_setDefaultDownstreamCompiler : 71IGlobalSession_setDefaultDownstreamCompiler (objectId ,parameterBlock ); 72break ; 73case ApiCallId ::IGlobalSession_getDefaultDownstreamCompiler : 74IGlobalSession_getDefaultDownstreamCompiler (objectId ,parameterBlock ); 75break ; 76case ApiCallId ::IGlobalSession_setLanguagePrelude : 77IGlobalSession_setLanguagePrelude (objectId ,parameterBlock ); 78break ; 79case ApiCallId ::IGlobalSession_getLanguagePrelude : 80IGlobalSession_getLanguagePrelude (objectId ,parameterBlock ); 81break ; 82case ApiCallId ::IGlobalSession_createCompileRequest : 83IGlobalSession_createCompileRequest (objectId ,parameterBlock ); 84break ; 85case ApiCallId ::IGlobalSession_addBuiltins : 86IGlobalSession_addBuiltins (objectId ,parameterBlock ); 87break ; 88case ApiCallId ::IGlobalSession_setSharedLibraryLoader : 89IGlobalSession_setSharedLibraryLoader (objectId ,parameterBlock ); 90break ; 91case ApiCallId ::IGlobalSession_getSharedLibraryLoader : 92IGlobalSession_getSharedLibraryLoader (objectId ,parameterBlock ); 93break ; 94case ApiCallId ::IGlobalSession_checkCompileTargetSupport : 95IGlobalSession_checkCompileTargetSupport (objectId ,parameterBlock ); 96break ; 97case ApiCallId ::IGlobalSession_checkPassThroughSupport : 98IGlobalSession_checkPassThroughSupport (objectId ,parameterBlock ); 99break ; 100case ApiCallId ::IGlobalSession_compileCoreModule : 101IGlobalSession_compileCoreModule (objectId ,parameterBlock ); 102break ; 103case ApiCallId ::IGlobalSession_loadCoreModule : 104IGlobalSession_loadCoreModule (objectId ,parameterBlock ); 105break ; 106case ApiCallId ::IGlobalSession_saveCoreModule : 107IGlobalSession_saveCoreModule (objectId ,parameterBlock ); 108break ; 109case ApiCallId ::IGlobalSession_findCapability : 110IGlobalSession_findCapability (objectId ,parameterBlock ); 111break ; 112case ApiCallId ::IGlobalSession_setDownstreamCompilerForTransition : 113IGlobalSession_setDownstreamCompilerForTransition (objectId ,parameterBlock ); 114break ; 115case ApiCallId ::IGlobalSession_getDownstreamCompilerForTransition : 116IGlobalSession_getDownstreamCompilerForTransition (objectId ,parameterBlock ); 117break ; 118case ApiCallId ::IGlobalSession_getCompilerElapsedTime : 119IGlobalSession_getCompilerElapsedTime (objectId ,parameterBlock ); 120break ; 121case ApiCallId ::IGlobalSession_setSPIRVCoreGrammar : 122IGlobalSession_setSPIRVCoreGrammar (objectId ,parameterBlock ); 123break ; 124case ApiCallId ::IGlobalSession_parseCommandLineArguments : 125IGlobalSession_parseCommandLineArguments (objectId ,parameterBlock ); 126break ; 127case ApiCallId ::IGlobalSession_getSessionDescDigest : 128IGlobalSession_getSessionDescDigest (objectId ,parameterBlock ); 129break ; 130 } 131return true; 132} 133 134 135bool SlangDecoder ::processISessionMethods ( 136ApiCallId callId , 137ObjectID objectId , 138ParameterBlock const & parameterBlock ) 139{ 140switch (callId ) 141 { 142default : 143slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,callId ); 144return false; 145case ApiCallId ::ISession_getGlobalSession : 146ISession_getGlobalSession (objectId ,parameterBlock ); 147break ; 148case ApiCallId ::ISession_loadModule : 149ISession_loadModule (objectId ,parameterBlock ); 150break ; 151case ApiCallId ::ISession_loadModuleFromIRBlob : 152ISession_loadModuleFromIRBlob (objectId ,parameterBlock ); 153break ; 154case ApiCallId ::ISession_loadModuleFromSource : 155ISession_loadModuleFromSource (objectId ,parameterBlock ); 156break ; 157case ApiCallId ::ISession_loadModuleFromSourceString : 158ISession_loadModuleFromSourceString (objectId ,parameterBlock ); 159break ; 160case ApiCallId ::ISession_createCompositeComponentType : 161ISession_createCompositeComponentType (objectId ,parameterBlock ); 162break ; 163case ApiCallId ::ISession_specializeType : 164ISession_specializeType (objectId ,parameterBlock ); 165break ; 166case ApiCallId ::ISession_getTypeLayout : 167ISession_getTypeLayout (objectId ,parameterBlock ); 168break ; 169case ApiCallId ::ISession_getContainerType : 170ISession_getContainerType (objectId ,parameterBlock ); 171break ; 172case ApiCallId ::ISession_getDynamicType : 173ISession_getDynamicType (objectId ,parameterBlock ); 174break ; 175case ApiCallId ::ISession_getTypeRTTIMangledName : 176ISession_getTypeRTTIMangledName (objectId ,parameterBlock ); 177break ; 178case ApiCallId ::ISession_getTypeConformanceWitnessMangledName : 179ISession_getTypeConformanceWitnessMangledName (objectId ,parameterBlock ); 180break ; 181case ApiCallId ::ISession_getTypeConformanceWitnessSequentialID : 182ISession_getTypeConformanceWitnessSequentialID (objectId ,parameterBlock ); 183break ; 184case ApiCallId ::ISession_createTypeConformanceComponentType : 185ISession_createTypeConformanceComponentType (objectId ,parameterBlock ); 186break ; 187case ApiCallId ::ISession_createCompileRequest : 188ISession_createCompileRequest (objectId ,parameterBlock ); 189break ; 190case ApiCallId ::ISession_getLoadedModuleCount : 191ISession_getLoadedModuleCount (objectId ,parameterBlock ); 192break ; 193case ApiCallId ::ISession_getLoadedModule : 194ISession_getLoadedModule (objectId ,parameterBlock ); 195break ; 196case ApiCallId ::ISession_isBinaryModuleUpToDate : 197ISession_isBinaryModuleUpToDate (objectId ,parameterBlock ); 198break ; 199 } 200return true; 201} 202 203bool SlangDecoder ::processIModuleMethods ( 204ApiCallId callId , 205ObjectID objectId , 206ParameterBlock const & parameterBlock ) 207{ 208switch (callId ) 209 { 210default : 211slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,callId ); 212return false; 213case ApiCallId ::IModule_findEntryPointByName : 214IModule_findEntryPointByName (objectId ,parameterBlock ); 215break ; 216case ApiCallId ::IModule_getDefinedEntryPointCount : 217IModule_getDefinedEntryPointCount (objectId ,parameterBlock ); 218break ; 219case ApiCallId ::IModule_getDefinedEntryPoint : 220IModule_getDefinedEntryPoint (objectId ,parameterBlock ); 221break ; 222case ApiCallId ::IModule_serialize : 223IModule_serialize (objectId ,parameterBlock ); 224break ; 225case ApiCallId ::IModule_writeToFile : 226IModule_writeToFile (objectId ,parameterBlock ); 227break ; 228case ApiCallId ::IModule_getName : 229IModule_getName (objectId ,parameterBlock ); 230break ; 231case ApiCallId ::IModule_getFilePath : 232IModule_getFilePath (objectId ,parameterBlock ); 233break ; 234case ApiCallId ::IModule_getUniqueIdentity : 235IModule_getUniqueIdentity (objectId ,parameterBlock ); 236break ; 237case ApiCallId ::IModule_findAndCheckEntryPoint : 238IModule_findAndCheckEntryPoint (objectId ,parameterBlock ); 239break ; 240case ApiCallId ::IModule_getSession : 241IModule_getSession (objectId ,parameterBlock ); 242break ; 243case ApiCallId ::IModule_getLayout : 244IModule_getLayout (objectId ,parameterBlock ); 245break ; 246case ApiCallId ::IModule_getSpecializationParamCount : 247IModule_getSpecializationParamCount (objectId ,parameterBlock ); 248break ; 249case ApiCallId ::IModule_getEntryPointCode : 250IModule_getEntryPointCode (objectId ,parameterBlock ); 251break ; 252case ApiCallId ::IModule_getTargetCode : 253IModule_getTargetCode (objectId ,parameterBlock ); 254break ; 255case ApiCallId ::IModule_getResultAsFileSystem : 256IModule_getResultAsFileSystem (objectId ,parameterBlock ); 257break ; 258case ApiCallId ::IModule_getEntryPointHash : 259IModule_getEntryPointHash (objectId ,parameterBlock ); 260break ; 261case ApiCallId ::IModule_specialize : 262IModule_specialize (objectId ,parameterBlock ); 263break ; 264case ApiCallId ::IModule_link : 265IModule_link (objectId ,parameterBlock ); 266break ; 267case ApiCallId ::IModule_getEntryPointHostCallable : 268IModule_getEntryPointHostCallable (objectId ,parameterBlock ); 269break ; 270case ApiCallId ::IModule_renameEntryPoint : 271IModule_renameEntryPoint (objectId ,parameterBlock ); 272break ; 273case ApiCallId ::IModule_linkWithOptions : 274IModule_linkWithOptions (objectId ,parameterBlock ); 275break ; 276 } 277return true; 278} 279 280bool SlangDecoder ::processIEntryPointMethods ( 281ApiCallId callId , 282ObjectID objectId , 283ParameterBlock const & parameterBlock ) 284{ 285switch (callId ) 286 { 287default : 288slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,callId ); 289return false; 290case ApiCallId ::IEntryPoint_getSession : 291IEntryPoint_getSession (objectId ,parameterBlock ); 292break ; 293case ApiCallId ::IEntryPoint_getLayout : 294IEntryPoint_getLayout (objectId ,parameterBlock ); 295break ; 296case ApiCallId ::IEntryPoint_getSpecializationParamCount : 297IEntryPoint_getSpecializationParamCount (objectId ,parameterBlock ); 298break ; 299case ApiCallId ::IEntryPoint_getEntryPointCode : 300IEntryPoint_getEntryPointCode (objectId ,parameterBlock ); 301break ; 302case ApiCallId ::IEntryPoint_getTargetCode : 303IEntryPoint_getTargetCode (objectId ,parameterBlock ); 304break ; 305case ApiCallId ::IEntryPoint_getResultAsFileSystem : 306IEntryPoint_getResultAsFileSystem (objectId ,parameterBlock ); 307break ; 308case ApiCallId ::IEntryPoint_getEntryPointHash : 309IEntryPoint_getEntryPointHash (objectId ,parameterBlock ); 310break ; 311case ApiCallId ::IEntryPoint_specialize : 312IEntryPoint_specialize (objectId ,parameterBlock ); 313break ; 314case ApiCallId ::IEntryPoint_link : 315IEntryPoint_link (objectId ,parameterBlock ); 316break ; 317case ApiCallId ::IEntryPoint_getEntryPointHostCallable : 318IEntryPoint_getEntryPointHostCallable (objectId ,parameterBlock ); 319break ; 320case ApiCallId ::IEntryPoint_renameEntryPoint : 321IEntryPoint_renameEntryPoint (objectId ,parameterBlock ); 322break ; 323case ApiCallId ::IEntryPoint_linkWithOptions : 324IEntryPoint_linkWithOptions (objectId ,parameterBlock ); 325break ; 326 } 327return true; 328} 329 330bool SlangDecoder ::processICompositeComponentTypeMethods ( 331ApiCallId callId , 332ObjectID objectId , 333ParameterBlock const & parameterBlock ) 334{ 335switch (callId ) 336 { 337default : 338slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,callId ); 339break ; 340case ApiCallId ::ICompositeComponentType_getSession : 341ICompositeComponentType_getSession (objectId ,parameterBlock ); 342break ; 343case ApiCallId ::ICompositeComponentType_getLayout : 344ICompositeComponentType_getLayout (objectId ,parameterBlock ); 345break ; 346case ApiCallId ::ICompositeComponentType_getSpecializationParamCount : 347ICompositeComponentType_getSpecializationParamCount (objectId ,parameterBlock ); 348break ; 349case ApiCallId ::ICompositeComponentType_getEntryPointCode : 350ICompositeComponentType_getEntryPointCode (objectId ,parameterBlock ); 351break ; 352case ApiCallId ::ICompositeComponentType_getTargetCode : 353ICompositeComponentType_getTargetCode (objectId ,parameterBlock ); 354break ; 355case ApiCallId ::ICompositeComponentType_getResultAsFileSystem : 356ICompositeComponentType_getResultAsFileSystem (objectId ,parameterBlock ); 357break ; 358case ApiCallId ::ICompositeComponentType_getEntryPointHash : 359ICompositeComponentType_getEntryPointHash (objectId ,parameterBlock ); 360break ; 361case ApiCallId ::ICompositeComponentType_specialize : 362ICompositeComponentType_specialize (objectId ,parameterBlock ); 363break ; 364case ApiCallId ::ICompositeComponentType_link : 365ICompositeComponentType_link (objectId ,parameterBlock ); 366break ; 367case ApiCallId ::ICompositeComponentType_getEntryPointHostCallable : 368ICompositeComponentType_getEntryPointHostCallable (objectId ,parameterBlock ); 369break ; 370case ApiCallId ::ICompositeComponentType_renameEntryPoint : 371ICompositeComponentType_renameEntryPoint (objectId ,parameterBlock ); 372break ; 373case ApiCallId ::ICompositeComponentType_linkWithOptions : 374ICompositeComponentType_linkWithOptions (objectId ,parameterBlock ); 375break ; 376case ApiCallId ::ICompositeComponentType_queryInterface : 377ICompositeComponentType_queryInterface (objectId ,parameterBlock ); 378break ; 379 } 380return true; 381} 382 383bool SlangDecoder ::processITypeConformanceMethods ( 384ApiCallId callId , 385ObjectID objectId , 386ParameterBlock const & parameterBlock ) 387{ 388switch (callId ) 389 { 390default : 391slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,callId ); 392return false; 393case ApiCallId ::ITypeConformance_getSession : 394ITypeConformance_getSession (objectId ,parameterBlock ); 395break ; 396case ApiCallId ::ITypeConformance_getLayout : 397ITypeConformance_getLayout (objectId ,parameterBlock ); 398break ; 399case ApiCallId ::ITypeConformance_getSpecializationParamCount : 400ITypeConformance_getSpecializationParamCount (objectId ,parameterBlock ); 401break ; 402case ApiCallId ::ITypeConformance_getEntryPointCode : 403ITypeConformance_getEntryPointCode (objectId ,parameterBlock ); 404break ; 405case ApiCallId ::ITypeConformance_getTargetCode : 406ITypeConformance_getTargetCode (objectId ,parameterBlock ); 407break ; 408case ApiCallId ::ITypeConformance_getResultAsFileSystem : 409ITypeConformance_getResultAsFileSystem (objectId ,parameterBlock ); 410break ; 411case ApiCallId ::ITypeConformance_getEntryPointHash : 412ITypeConformance_getEntryPointHash (objectId ,parameterBlock ); 413break ; 414case ApiCallId ::ITypeConformance_specialize : 415ITypeConformance_specialize (objectId ,parameterBlock ); 416break ; 417case ApiCallId ::ITypeConformance_link : 418ITypeConformance_link (objectId ,parameterBlock ); 419break ; 420case ApiCallId ::ITypeConformance_getEntryPointHostCallable : 421ITypeConformance_getEntryPointHostCallable (objectId ,parameterBlock ); 422break ; 423case ApiCallId ::ITypeConformance_renameEntryPoint : 424ITypeConformance_renameEntryPoint (objectId ,parameterBlock ); 425break ; 426case ApiCallId ::ITypeConformance_linkWithOptions : 427ITypeConformance_linkWithOptions (objectId ,parameterBlock ); 428break ; 429case ApiCallId ::IComponentType2_getTargetCompileResult : 430IComponentType2_getTargetCompileResult (objectId ,parameterBlock ); 431break ; 432case ApiCallId ::IComponentType2_getEntryPointCompileResult : 433IComponentType2_getEntryPointCompileResult (objectId ,parameterBlock ); 434break ; 435 } 436return true; 437} 438 439bool SlangDecoder ::processFunctionCall ( 440FunctionHeader const & header , 441ParameterBlock const & parameterBlock ) 442{ 443switch (header .callId ) 444 { 445default : 446slangRecordLog (LogLevel ::Error ,"Unhandled Slang API call: %d\n" ,header .callId ); 447return false; 448case ApiCallId ::CreateGlobalSession : 449CreateGlobalSession (parameterBlock ); 450break ; 451 } 452return true; 453} 454 455 456bool SlangDecoder ::CreateGlobalSession (ParameterBlock const & parameterBlock ) 457{ 458StructDecoder < SlangGlobalSessionDesc > sessionDesc ; 459sessionDesc .decode (parameterBlock .parameterBuffer ,parameterBlock .parameterBufferSize ); 460 461ObjectID outGlobalSessionId = 0 ; 462ParameterDecoder ::decodeAddress ( 463parameterBlock .outputBuffer , 464parameterBlock .outputBufferSize , 465outGlobalSessionId ); 466 467for (auto consumer :m_consumers ) 468 { 469consumer -> CreateGlobalSession (sessionDesc .getValue (),outGlobalSessionId ); 470 } 471return true; 472} 473 474bool SlangDecoder ::IGlobalSession_createSession ( 475ObjectID objectId , 476ParameterBlock const & parameterBlock ) 477{ 478StructDecoder < slang::SessionDesc > sessionDesc ; 479sessionDesc .decode (parameterBlock .parameterBuffer ,parameterBlock .parameterBufferSize ); 480 481ObjectID outSessionId = 0 ; 482ParameterDecoder ::decodeAddress ( 483parameterBlock .outputBuffer , 484parameterBlock .outputBufferSize , 485outSessionId ); 486 487for (auto consumer :m_consumers ) 488 { 489consumer -> IGlobalSession_createSession (objectId ,sessionDesc .getValue (),outSessionId ); 490 } 491 492return true; 493} 494 495void SlangDecoder ::IGlobalSession_findProfile ( 496ObjectID objectId , 497ParameterBlock const & parameterBlock ) 498{ 499StringDecoder name ; 500ParameterDecoder ::decodeString ( 501parameterBlock .parameterBuffer , 502parameterBlock .parameterBufferSize , 503name ); 504 505for (auto consumer :m_consumers ) 506 { 507consumer -> IGlobalSession_findProfile (objectId ,name .getPointer ()); 508 } 509} 510 511void SlangDecoder ::IGlobalSession_setDownstreamCompilerPath ( 512ObjectID objectId , 513ParameterBlock const & parameterBlock ) 514{ 515size_t readByte = 0 ; 516SlangPassThrough passThrough {}; 517readByte = ParameterDecoder ::decodeEnumValue ( 518parameterBlock .parameterBuffer , 519parameterBlock .parameterBufferSize , 520passThrough ); 521StringDecoder path ; 522readByte += ParameterDecoder ::decodeString ( 523parameterBlock .parameterBuffer + readByte , 524parameterBlock .parameterBufferSize - readByte , 525path ); 526 527for (auto consumer :m_consumers ) 528 { 529consumer -> IGlobalSession_setDownstreamCompilerPath ( 530objectId , 531passThrough , 532path .getPointer ()); 533 } 534} 535 536void SlangDecoder ::IGlobalSession_setDownstreamCompilerPrelude ( 537ObjectID objectId , 538ParameterBlock const & parameterBlock ) 539{ 540size_t readByte = 0 ; 541SlangPassThrough passThrough {}; 542readByte = ParameterDecoder ::decodeEnumValue ( 543parameterBlock .parameterBuffer , 544parameterBlock .parameterBufferSize , 545passThrough ); 546StringDecoder prelude ; 547readByte += ParameterDecoder ::decodeString ( 548parameterBlock .parameterBuffer + readByte , 549parameterBlock .parameterBufferSize - readByte , 550prelude ); 551 552for (auto consumer :m_consumers ) 553 { 554consumer -> IGlobalSession_setDownstreamCompilerPrelude ( 555objectId , 556passThrough , 557prelude .getPointer ()); 558 } 559} 560 561void SlangDecoder ::IGlobalSession_getDownstreamCompilerPrelude ( 562ObjectID objectId , 563ParameterBlock const & parameterBlock ) 564{ 565SlangPassThrough passThrough {}; 566ParameterDecoder ::decodeEnumValue ( 567parameterBlock .parameterBuffer , 568parameterBlock .parameterBufferSize , 569passThrough ); 570 571ObjectID outPreludeId = 0 ; 572ParameterDecoder ::decodeAddress ( 573parameterBlock .outputBuffer , 574parameterBlock .outputBufferSize , 575outPreludeId ); 576 577for (auto consumer :m_consumers ) 578 { 579consumer -> IGlobalSession_getDownstreamCompilerPrelude (objectId ,passThrough ,outPreludeId ); 580 } 581} 582 583void SlangDecoder ::IGlobalSession_getBuildTagString ( 584ObjectID objectId , 585ParameterBlock const & parameterBlock ) 586{ 587 (void )objectId ; 588 (void )parameterBlock ; 589slangRecordLog ( 590LogLevel ::Debug , 591"%s should not be called, it'a not recordd\n" , 592__PRETTY_FUNCTION__ ); 593} 594 595void SlangDecoder ::IGlobalSession_setDefaultDownstreamCompiler ( 596ObjectID objectId , 597ParameterBlock const & parameterBlock ) 598{ 599size_t readByte = 0 ; 600SlangSourceLanguage sourceLanguage {}; 601SlangPassThrough defaultCompiler {}; 602readByte = ParameterDecoder ::decodeEnumValue ( 603parameterBlock .parameterBuffer , 604parameterBlock .parameterBufferSize , 605sourceLanguage ); 606readByte += ParameterDecoder ::decodeEnumValue ( 607parameterBlock .parameterBuffer + readByte , 608parameterBlock .parameterBufferSize - readByte , 609defaultCompiler ); 610 611for (auto consumer :m_consumers ) 612 { 613consumer -> IGlobalSession_setDefaultDownstreamCompiler ( 614objectId , 615sourceLanguage , 616defaultCompiler ); 617 } 618} 619 620void SlangDecoder ::IGlobalSession_getDefaultDownstreamCompiler ( 621ObjectID objectId , 622ParameterBlock const & parameterBlock ) 623{ 624SlangSourceLanguage sourceLanguage {}; 625ParameterDecoder ::decodeEnumValue ( 626parameterBlock .parameterBuffer , 627parameterBlock .parameterBufferSize , 628sourceLanguage ); 629 630for (auto consumer :m_consumers ) 631 { 632consumer -> IGlobalSession_getDefaultDownstreamCompiler (objectId ,sourceLanguage ); 633 } 634} 635 636void SlangDecoder ::IGlobalSession_setLanguagePrelude ( 637ObjectID objectId , 638ParameterBlock const & parameterBlock ) 639{ 640size_t readByte = 0 ; 641SlangSourceLanguage sourceLanguage {}; 642StringDecoder prelude ; 643readByte = ParameterDecoder ::decodeEnumValue ( 644parameterBlock .parameterBuffer , 645parameterBlock .parameterBufferSize , 646sourceLanguage ); 647readByte += ParameterDecoder ::decodeString ( 648parameterBlock .parameterBuffer + readByte , 649parameterBlock .parameterBufferSize - readByte , 650prelude ); 651 652for (auto consumer :m_consumers ) 653 { 654consumer -> IGlobalSession_setLanguagePrelude (objectId ,sourceLanguage ,prelude .getPointer ()); 655 } 656} 657 658void SlangDecoder ::IGlobalSession_getLanguagePrelude ( 659ObjectID objectId , 660ParameterBlock const & parameterBlock ) 661{ 662SlangSourceLanguage sourceLanguage {}; 663ObjectID outPreludeId = 0 ; 664ParameterDecoder ::decodeEnumValue ( 665parameterBlock .parameterBuffer , 666parameterBlock .parameterBufferSize , 667sourceLanguage ); 668ParameterDecoder ::decodeAddress ( 669parameterBlock .outputBuffer , 670parameterBlock .outputBufferSize , 671outPreludeId ); 672 673for (auto consumer :m_consumers ) 674 { 675consumer -> IGlobalSession_getLanguagePrelude (objectId ,sourceLanguage ,outPreludeId ); 676 } 677} 678 679void SlangDecoder ::IGlobalSession_createCompileRequest ( 680ObjectID objectId , 681ParameterBlock const & parameterBlock ) 682{ 683ObjectID outCompileRequestId = 0 ; 684ParameterDecoder ::decodeAddress ( 685parameterBlock .outputBuffer , 686parameterBlock .outputBufferSize , 687outCompileRequestId ); 688 689for (auto consumer :m_consumers ) 690 { 691consumer -> IGlobalSession_createCompileRequest (objectId ,outCompileRequestId ); 692 } 693} 694 695void SlangDecoder ::IGlobalSession_addBuiltins ( 696ObjectID objectId , 697ParameterBlock const & parameterBlock ) 698{ 699size_t readBytes = 0 ; 700StringDecoder sourcePath ; 701StringDecoder sourceString ; 702readBytes = ParameterDecoder ::decodeString ( 703parameterBlock .parameterBuffer , 704parameterBlock .parameterBufferSize , 705sourcePath ); 706readBytes += ParameterDecoder ::decodeString ( 707parameterBlock .parameterBuffer + readBytes , 708parameterBlock .parameterBufferSize - readBytes , 709sourceString ); 710 711for (auto consumer :m_consumers ) 712 { 713consumer -> IGlobalSession_addBuiltins ( 714objectId , 715sourcePath .getPointer (), 716sourceString .getPointer ()); 717 } 718} 719 720void SlangDecoder ::IGlobalSession_setSharedLibraryLoader ( 721ObjectID objectId , 722ParameterBlock const & parameterBlock ) 723{ 724// TODO: Not sure if we need to record this function. Because this functions is something like 725// the file system override, it's provided by user code. So capturing it makes no sense. The 726// only way is to wrapper this interface by our own implementation, and record it there. 727slangRecordLog (LogLevel ::Error ,"%s should not be called\n" ,__PRETTY_FUNCTION__ ); 728} 729 730void SlangDecoder ::IGlobalSession_getSharedLibraryLoader ( 731ObjectID objectId , 732ParameterBlock const & parameterBlock ) 733{ 734ObjectID outLoaderId = 0 ; 735ParameterDecoder ::decodeAddress ( 736parameterBlock .outputBuffer , 737parameterBlock .outputBufferSize , 738outLoaderId ); 739 740for (auto consumer :m_consumers ) 741 { 742consumer -> IGlobalSession_getSharedLibraryLoader (objectId ,outLoaderId ); 743 } 744} 745 746void SlangDecoder ::IGlobalSession_checkCompileTargetSupport ( 747ObjectID objectId , 748ParameterBlock const & parameterBlock ) 749{ 750 (void )objectId ; 751 (void )parameterBlock ; 752slangRecordLog ( 753LogLevel ::Debug , 754"%s should not be called, it'a not recordd\n" , 755__PRETTY_FUNCTION__ ); 756} 757 758void SlangDecoder ::IGlobalSession_checkPassThroughSupport ( 759ObjectID objectId , 760ParameterBlock const & parameterBlock ) 761{ 762 (void )objectId ; 763 (void )parameterBlock ; 764slangRecordLog ( 765LogLevel ::Debug , 766"%s should not be called, it'a not recordd\n" , 767__PRETTY_FUNCTION__ ); 768} 769 770void SlangDecoder ::IGlobalSession_compileCoreModule ( 771ObjectID objectId , 772ParameterBlock const & parameterBlock ) 773{ 774 slang::CompileCoreModuleFlags flags {}; 775ParameterDecoder ::decodeEnumValue ( 776parameterBlock .parameterBuffer , 777parameterBlock .parameterBufferSize , 778flags ); 779 780for (auto consumer :m_consumers ) 781 { 782consumer -> IGlobalSession_compileCoreModule (objectId ,flags ); 783 } 784} 785 786void SlangDecoder ::IGlobalSession_loadCoreModule ( 787ObjectID objectId , 788ParameterBlock const & parameterBlock ) 789{ 790PointerDecoder < void *> coreModule ; 791ParameterDecoder ::decodePointer ( 792parameterBlock .parameterBuffer , 793parameterBlock .parameterBufferSize , 794coreModule ); 795 796for (auto consumer :m_consumers ) 797 { 798consumer -> IGlobalSession_loadCoreModule ( 799objectId , 800coreModule .getPointer (), 801coreModule .getDataSize ()); 802 } 803} 804 805void SlangDecoder ::IGlobalSession_saveCoreModule ( 806ObjectID objectId , 807ParameterBlock const & parameterBlock ) 808{ 809SlangArchiveType archiveType {}; 810ObjectID outBlobId = 0 ; 811ParameterDecoder ::decodeEnumValue ( 812parameterBlock .parameterBuffer , 813parameterBlock .parameterBufferSize , 814archiveType ); 815ParameterDecoder ::decodeAddress ( 816parameterBlock .outputBuffer , 817parameterBlock .outputBufferSize , 818outBlobId ); 819 820for (auto consumer :m_consumers ) 821 { 822consumer -> IGlobalSession_saveCoreModule (objectId ,archiveType ,outBlobId ); 823 } 824} 825 826void SlangDecoder ::IGlobalSession_findCapability ( 827ObjectID objectId , 828ParameterBlock const & parameterBlock ) 829{ 830 (void )objectId ; 831 (void )parameterBlock ; 832slangRecordLog ( 833LogLevel ::Debug , 834"%s should not be called, it'a not recordd\n" , 835__PRETTY_FUNCTION__ ); 836} 837 838void SlangDecoder ::IGlobalSession_setDownstreamCompilerForTransition ( 839ObjectID objectId , 840ParameterBlock const & parameterBlock ) 841{ 842size_t readByte = 0 ; 843SlangCompileTarget source {}; 844SlangCompileTarget target {}; 845SlangPassThrough compiler {}; 846 847readByte = ParameterDecoder ::decodeEnumValue ( 848parameterBlock .parameterBuffer , 849parameterBlock .parameterBufferSize , 850source ); 851readByte += ParameterDecoder ::decodeEnumValue ( 852parameterBlock .parameterBuffer + readByte , 853parameterBlock .parameterBufferSize - readByte , 854target ); 855readByte += ParameterDecoder ::decodeEnumValue ( 856parameterBlock .parameterBuffer + readByte , 857parameterBlock .parameterBufferSize - readByte , 858compiler ); 859 860for (auto consumer :m_consumers ) 861 { 862consumer 863-> IGlobalSession_setDownstreamCompilerForTransition (objectId ,source ,target ,compiler ); 864 } 865} 866 867void SlangDecoder ::IGlobalSession_getDownstreamCompilerForTransition ( 868ObjectID objectId , 869ParameterBlock const & parameterBlock ) 870{ 871 (void )objectId ; 872 (void )parameterBlock ; 873slangRecordLog ( 874LogLevel ::Debug , 875"%s should not be called, it'a not recordd\n" , 876__PRETTY_FUNCTION__ ); 877} 878 879void SlangDecoder ::IGlobalSession_getCompilerElapsedTime ( 880ObjectID objectId , 881ParameterBlock const & parameterBlock ) 882{ 883 (void )objectId ; 884 (void )parameterBlock ; 885slangRecordLog ( 886LogLevel ::Debug , 887"%s should not be called, it'a not recordd\n" , 888__PRETTY_FUNCTION__ ); 889} 890 891void SlangDecoder ::IGlobalSession_setSPIRVCoreGrammar ( 892ObjectID objectId , 893ParameterBlock const & parameterBlock ) 894{ 895 (void )objectId ; 896 (void )parameterBlock ; 897slangRecordLog ( 898LogLevel ::Debug , 899"%s should not be called, it'a not recordd\n" , 900__PRETTY_FUNCTION__ ); 901} 902 903void SlangDecoder ::IGlobalSession_parseCommandLineArguments ( 904ObjectID objectId , 905ParameterBlock const & parameterBlock ) 906{ 907int argc = 0 ; 908size_t readByte = 0 ; 909readByte = ParameterDecoder ::decodeInt32 ( 910parameterBlock .parameterBuffer , 911parameterBlock .parameterBufferSize , 912argc ); 913 std::vector < char *> argv ; 914 915if (argc > 0 ) 916 { 917uint32_t arrayCount = 0 ; 918readByte += ParameterDecoder ::decodeUint32 ( 919parameterBlock .parameterBuffer + readByte , 920parameterBlock .parameterBufferSize - readByte , 921arrayCount ); 922 923SLANG_RECORD_ASSERT (arrayCount == (uint32_t )argc ); 924argv .resize (arrayCount ); 925 926readByte += ParameterDecoder ::decodeStringArray ( 927parameterBlock .parameterBuffer + readByte , 928parameterBlock .parameterBufferSize - readByte , 929argv .data (), 930arrayCount ); 931 } 932 933ObjectID outSessionDescId = 0 ; 934ObjectID outAllocationId = 0 ; 935readByte = ParameterDecoder ::decodeAddress ( 936parameterBlock .outputBuffer , 937parameterBlock .outputBufferSize , 938outSessionDescId ); 939readByte += ParameterDecoder ::decodeAddress ( 940parameterBlock .outputBuffer + readByte , 941parameterBlock .outputBufferSize - readByte , 942outAllocationId ); 943 944for (auto consumer :m_consumers ) 945 { 946consumer -> IGlobalSession_parseCommandLineArguments ( 947objectId , 948argc , 949argv .data (), 950outSessionDescId , 951outAllocationId ); 952 } 953} 954 955void SlangDecoder ::IGlobalSession_getSessionDescDigest ( 956ObjectID objectId , 957ParameterBlock const & parameterBlock ) 958{ 959StructDecoder < slang::SessionDesc > sessionDesc ; 960ObjectID outBlobId = 0 ; 961size_t readByte = 0 ; 962sessionDesc .decode (parameterBlock .parameterBuffer ,parameterBlock .parameterBufferSize ); 963ParameterDecoder ::decodeAddress ( 964parameterBlock .outputBuffer + readByte , 965parameterBlock .outputBufferSize - readByte , 966outBlobId ); 967 968for (auto consumer :m_consumers ) 969 { 970consumer -> IGlobalSession_getSessionDescDigest (objectId ,& sessionDesc .getValue (),outBlobId ); 971 } 972} 973 974 975void SlangDecoder ::ISession_getGlobalSession ( 976ObjectID objectId , 977ParameterBlock const & parameterBlock ) 978{ 979 (void )objectId ; 980 (void )parameterBlock ; 981slangRecordLog ( 982LogLevel ::Debug , 983"%s should not be called, it'a not recordd\n" , 984__PRETTY_FUNCTION__ ); 985} 986 987void SlangDecoder ::ISession_loadModule (ObjectID objectId ,ParameterBlock const & parameterBlock ) 988{ 989size_t readByte = 0 ; 990StringDecoder moduleName ; 991readByte += ParameterDecoder ::decodeString ( 992parameterBlock .parameterBuffer , 993parameterBlock .parameterBufferSize , 994moduleName ); 995 996ObjectID outDiagnosticsId = 0 ; 997ObjectID outModuleId = 0 ; 998readByte = ParameterDecoder ::decodeAddress ( 999parameterBlock .outputBuffer , 1000parameterBlock .outputBufferSize , 1001outDiagnosticsId ); 1002readByte += ParameterDecoder ::decodeAddress ( 1003parameterBlock .outputBuffer + readByte , 1004parameterBlock .outputBufferSize - readByte , 1005outModuleId ); 1006 1007for (auto consumer :m_consumers ) 1008 { 1009consumer 1010-> ISession_loadModule (objectId ,moduleName .getPointer (),outDiagnosticsId ,outModuleId ); 1011 } 1012} 1013 1014void SlangDecoder ::ISession_loadModuleFromIRBlob ( 1015ObjectID objectId , 1016ParameterBlock const & parameterBlock ) 1017{ 1018size_t readByte = 0 ; 1019StringDecoder moduleName ; 1020StringDecoder path ; 1021BlobDecoder source ; 1022readByte = ParameterDecoder ::decodeString ( 1023parameterBlock .parameterBuffer , 1024parameterBlock .parameterBufferSize , 1025moduleName ); 1026readByte += ParameterDecoder ::decodeString ( 1027parameterBlock .parameterBuffer + readByte , 1028parameterBlock .parameterBufferSize - readByte , 1029path ); 1030readByte += source .decode ( 1031parameterBlock .parameterBuffer + readByte , 1032parameterBlock .parameterBufferSize - readByte ); 1033 1034ObjectID outDiagnosticsId = 0 ; 1035ObjectID outModuleId = 0 ; 1036readByte = ParameterDecoder ::decodeAddress ( 1037parameterBlock .outputBuffer , 1038parameterBlock .outputBufferSize , 1039outDiagnosticsId ); 1040readByte += ParameterDecoder ::decodeAddress ( 1041parameterBlock .outputBuffer + readByte , 1042parameterBlock .outputBufferSize - readByte , 1043outModuleId ); 1044 1045for (auto consumer :m_consumers ) 1046 { 1047consumer -> ISession_loadModuleFromIRBlob ( 1048objectId , 1049moduleName .getPointer (), 1050path .getPointer (), 1051source .getBlob (), 1052outDiagnosticsId , 1053outModuleId ); 1054 } 1055} 1056 1057void SlangDecoder ::ISession_loadModuleFromSource ( 1058ObjectID objectId , 1059ParameterBlock const & parameterBlock ) 1060{ 1061size_t readByte = 0 ; 1062StringDecoder moduleName ; 1063StringDecoder path ; 1064BlobDecoder source ; 1065readByte = ParameterDecoder ::decodeString ( 1066parameterBlock .parameterBuffer , 1067parameterBlock .parameterBufferSize , 1068moduleName ); 1069readByte += ParameterDecoder ::decodeString ( 1070parameterBlock .parameterBuffer + readByte , 1071parameterBlock .parameterBufferSize - readByte , 1072path ); 1073readByte += source .decode ( 1074parameterBlock .parameterBuffer + readByte , 1075parameterBlock .parameterBufferSize - readByte ); 1076 1077ObjectID outDiagnosticsId = 0 ; 1078ObjectID outModuleId = 0 ; 1079readByte = ParameterDecoder ::decodeAddress ( 1080parameterBlock .outputBuffer , 1081parameterBlock .outputBufferSize , 1082outDiagnosticsId ); 1083readByte += ParameterDecoder ::decodeAddress ( 1084parameterBlock .outputBuffer + readByte , 1085parameterBlock .outputBufferSize - readByte , 1086outModuleId ); 1087 1088for (auto consumer :m_consumers ) 1089 { 1090consumer -> ISession_loadModuleFromSource ( 1091objectId , 1092moduleName .getPointer (), 1093path .getPointer (), 1094source .getBlob (), 1095outDiagnosticsId , 1096outModuleId ); 1097 } 1098} 1099 1100void SlangDecoder ::ISession_loadModuleFromSourceString ( 1101ObjectID objectId , 1102ParameterBlock const & parameterBlock ) 1103{ 1104size_t readByte = 0 ; 1105StringDecoder moduleName ; 1106StringDecoder path ; 1107StringDecoder source ; 1108readByte = ParameterDecoder ::decodeString ( 1109parameterBlock .parameterBuffer , 1110parameterBlock .parameterBufferSize , 1111moduleName ); 1112readByte += ParameterDecoder ::decodeString ( 1113parameterBlock .parameterBuffer + readByte , 1114parameterBlock .parameterBufferSize - readByte , 1115path ); 1116readByte += ParameterDecoder ::decodeString ( 1117parameterBlock .parameterBuffer + readByte , 1118parameterBlock .parameterBufferSize - readByte , 1119source ); 1120 1121ObjectID outDiagnosticsId = 0 ; 1122ObjectID outModuleId = 0 ; 1123readByte = ParameterDecoder ::decodeAddress ( 1124parameterBlock .outputBuffer , 1125parameterBlock .outputBufferSize , 1126outDiagnosticsId ); 1127readByte += ParameterDecoder ::decodeAddress ( 1128parameterBlock .outputBuffer + readByte , 1129parameterBlock .outputBufferSize - readByte , 1130outModuleId ); 1131 1132for (auto consumer :m_consumers ) 1133 { 1134consumer -> ISession_loadModuleFromSourceString ( 1135objectId , 1136moduleName .getPointer (), 1137path .getPointer (), 1138source .getPointer (), 1139outDiagnosticsId , 1140outModuleId ); 1141 } 1142} 1143 1144void SlangDecoder ::ISession_createCompositeComponentType ( 1145ObjectID objectId , 1146ParameterBlock const & parameterBlock ) 1147{ 1148size_t readByte = 0 ; 1149 std::vector < ObjectID > componentTypeIdList ; 1150uint32_t arrayCount = 0 ; 1151readByte = ParameterDecoder ::decodeUint32 ( 1152parameterBlock .parameterBuffer , 1153parameterBlock .parameterBufferSize , 1154arrayCount ); 1155 1156componentTypeIdList .resize (arrayCount ); 1157readByte += ParameterDecoder ::decodeAddressArray ( 1158parameterBlock .parameterBuffer + readByte , 1159parameterBlock .parameterBufferSize - readByte , 1160componentTypeIdList .data (), 1161arrayCount ); 1162 1163ObjectID outCompositeComponentTypeId = 0 ; 1164ObjectID outDiagnosticsId = 0 ; 1165readByte = ParameterDecoder ::decodeAddress ( 1166parameterBlock .outputBuffer , 1167parameterBlock .outputBufferSize , 1168outCompositeComponentTypeId ); 1169readByte += ParameterDecoder ::decodeAddress ( 1170parameterBlock .outputBuffer + readByte , 1171parameterBlock .outputBufferSize - readByte , 1172outDiagnosticsId ); 1173 1174for (auto consumer :m_consumers ) 1175 { 1176consumer -> ISession_createCompositeComponentType ( 1177objectId , 1178componentTypeIdList .data (), 1179componentTypeIdList .size (), 1180outCompositeComponentTypeId , 1181outDiagnosticsId ); 1182 } 1183} 1184 1185// TODO: See https://github.com/shader-slang/slang/issues/4624 for more details 1186void SlangDecoder ::ISession_specializeType (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1187{ 1188slangRecordLog ( 1189LogLevel ::Error , 1190"%s: The shader reflection app is not recordd\n" , 1191__PRETTY_FUNCTION__ ); 1192 1193size_t readByte = 0 ; 1194ObjectID typeId = 0 ; 1195uint32_t arrayCount = 0 ; 1196readByte = ParameterDecoder ::decodeAddress ( 1197parameterBlock .parameterBuffer , 1198parameterBlock .parameterBufferSize , 1199typeId ); 1200readByte += ParameterDecoder ::decodeUint32 ( 1201parameterBlock .parameterBuffer + readByte , 1202parameterBlock .parameterBufferSize - readByte , 1203arrayCount ); 1204 1205 std::vector < slang::SpecializationArg > specializationArgs ; 1206specializationArgs .resize (arrayCount ); 1207readByte += ParameterDecoder ::decodeStructArray ( 1208parameterBlock .parameterBuffer + readByte , 1209parameterBlock .parameterBufferSize - readByte , 1210specializationArgs .data (), 1211arrayCount ); 1212 1213ObjectID outDiagnosticsId = 0 ; 1214ObjectID outTypeReflectionId = 0 ; 1215 1216readByte = ParameterDecoder ::decodeAddress ( 1217parameterBlock .outputBuffer + readByte , 1218parameterBlock .outputBufferSize , 1219outDiagnosticsId ); 1220readByte += ParameterDecoder ::decodeAddress ( 1221parameterBlock .outputBuffer + readByte , 1222parameterBlock .outputBufferSize - readByte , 1223outTypeReflectionId ); 1224 1225for (auto consumer :m_consumers ) 1226 { 1227consumer -> ISession_specializeType ( 1228objectId , 1229typeId , 1230specializationArgs .data (), 1231specializationArgs .size (), 1232outDiagnosticsId , 1233outTypeReflectionId ); 1234 } 1235} 1236 1237void SlangDecoder ::ISession_getTypeLayout (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1238{ 1239slangRecordLog ( 1240LogLevel ::Error , 1241"%s: The shader reflection app is not recordd\n" , 1242__PRETTY_FUNCTION__ ); 1243 1244size_t readByte = 0 ; 1245ObjectID typeId = 0 ; 1246int64_t targetIndex = 0 ; 1247 slang::LayoutRules rules {}; 1248readByte = ParameterDecoder ::decodeAddress ( 1249parameterBlock .parameterBuffer , 1250parameterBlock .parameterBufferSize , 1251typeId ); 1252readByte += ParameterDecoder ::decodeInt64 ( 1253parameterBlock .parameterBuffer + readByte , 1254parameterBlock .parameterBufferSize - readByte , 1255targetIndex ); 1256readByte += ParameterDecoder ::decodeEnumValue ( 1257parameterBlock .parameterBuffer + readByte , 1258parameterBlock .parameterBufferSize - readByte , 1259rules ); 1260 1261ObjectID outDiagnosticsId = 0 ; 1262ObjectID outTypeLayoutReflectionId = 0 ; 1263readByte = ParameterDecoder ::decodeAddress ( 1264parameterBlock .outputBuffer + readByte , 1265parameterBlock .outputBufferSize , 1266outDiagnosticsId ); 1267readByte += ParameterDecoder ::decodeAddress ( 1268parameterBlock .outputBuffer + readByte , 1269parameterBlock .outputBufferSize - readByte , 1270outTypeLayoutReflectionId ); 1271 1272for (auto consumer :m_consumers ) 1273 { 1274consumer -> ISession_getTypeLayout ( 1275objectId , 1276typeId , 1277targetIndex , 1278rules , 1279outDiagnosticsId , 1280outTypeLayoutReflectionId ); 1281 } 1282} 1283 1284void SlangDecoder ::ISession_getContainerType ( 1285ObjectID objectId , 1286ParameterBlock const & parameterBlock ) 1287{ 1288slangRecordLog ( 1289LogLevel ::Error , 1290"%s: The shader reflection app is not recordd\n" , 1291__PRETTY_FUNCTION__ ); 1292 1293size_t readByte = 0 ; 1294ObjectID elementType = 0 ; 1295 slang::ContainerType containerType {}; 1296readByte = ParameterDecoder ::decodeAddress ( 1297parameterBlock .parameterBuffer , 1298parameterBlock .parameterBufferSize , 1299elementType ); 1300readByte += ParameterDecoder ::decodeEnumValue ( 1301parameterBlock .parameterBuffer + readByte , 1302parameterBlock .parameterBufferSize - readByte , 1303containerType ); 1304 1305ObjectID outDiagnosticsId = 0 ; 1306ObjectID outTypeReflectionId = 0 ; 1307readByte = ParameterDecoder ::decodeAddress ( 1308parameterBlock .outputBuffer + readByte , 1309parameterBlock .outputBufferSize , 1310outDiagnosticsId ); 1311readByte += ParameterDecoder ::decodeAddress ( 1312parameterBlock .outputBuffer + readByte , 1313parameterBlock .parameterBufferSize - readByte , 1314outTypeReflectionId ); 1315 1316for (auto consumer :m_consumers ) 1317 { 1318consumer -> ISession_getContainerType ( 1319objectId , 1320elementType , 1321containerType , 1322outDiagnosticsId , 1323outTypeReflectionId ); 1324 } 1325} 1326 1327void SlangDecoder ::ISession_getDynamicType (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1328{ 1329slangRecordLog ( 1330LogLevel ::Error , 1331"%s: The shader reflection app is not recordd\n" , 1332__PRETTY_FUNCTION__ ); 1333 1334ObjectID outTypeReflectionId = 0 ; 1335ParameterDecoder ::decodeAddress ( 1336parameterBlock .outputBuffer , 1337parameterBlock .outputBufferSize , 1338outTypeReflectionId ); 1339 1340for (auto consumer :m_consumers ) 1341 { 1342consumer -> ISession_getDynamicType (objectId ,outTypeReflectionId ); 1343 } 1344} 1345 1346void SlangDecoder ::ISession_getTypeRTTIMangledName ( 1347ObjectID objectId , 1348ParameterBlock const & parameterBlock ) 1349{ 1350slangRecordLog ( 1351LogLevel ::Error , 1352"%s: The shader reflection app is not recordd\n" , 1353__PRETTY_FUNCTION__ ); 1354 1355ObjectID typeId = 0 ; 1356ObjectID outNameBlobId = 0 ; 1357ParameterDecoder ::decodeAddress ( 1358parameterBlock .parameterBuffer , 1359parameterBlock .parameterBufferSize , 1360typeId ); 1361ParameterDecoder ::decodeAddress ( 1362parameterBlock .outputBuffer , 1363parameterBlock .outputBufferSize , 1364outNameBlobId ); 1365 1366for (auto consumer :m_consumers ) 1367 { 1368consumer -> ISession_getTypeRTTIMangledName (objectId ,typeId ,outNameBlobId ); 1369 } 1370} 1371 1372void SlangDecoder ::ISession_getTypeConformanceWitnessMangledName ( 1373ObjectID objectId , 1374ParameterBlock const & parameterBlock ) 1375{ 1376slangRecordLog ( 1377LogLevel ::Error , 1378"%s: The shader reflection app is not recordd\n" , 1379__PRETTY_FUNCTION__ ); 1380 1381size_t readByte = 0 ; 1382ObjectID typeId = 0 ; 1383ObjectID interfaceTypeId = 0 ; 1384ObjectID outNameBlobId = 0 ; 1385readByte = ParameterDecoder ::decodeAddress ( 1386parameterBlock .parameterBuffer , 1387parameterBlock .parameterBufferSize , 1388typeId ); 1389readByte += ParameterDecoder ::decodeAddress ( 1390parameterBlock .parameterBuffer + readByte , 1391parameterBlock .parameterBufferSize - readByte , 1392interfaceTypeId ); 1393 1394readByte = ParameterDecoder ::decodeAddress ( 1395parameterBlock .outputBuffer , 1396parameterBlock .outputBufferSize , 1397outNameBlobId ); 1398 1399for (auto consumer :m_consumers ) 1400 { 1401consumer -> ISession_getTypeConformanceWitnessMangledName ( 1402objectId , 1403typeId , 1404interfaceTypeId , 1405outNameBlobId ); 1406 } 1407} 1408 1409void SlangDecoder ::ISession_getTypeConformanceWitnessSequentialID ( 1410ObjectID objectId , 1411ParameterBlock const & parameterBlock ) 1412{ 1413slangRecordLog ( 1414LogLevel ::Error , 1415"%s: The shader reflection app is not recordd\n" , 1416__PRETTY_FUNCTION__ ); 1417 1418size_t readByte = 0 ; 1419 1420ObjectID typeId = 0 ; 1421ObjectID interfaceTypeId = 0 ; 1422 1423readByte = ParameterDecoder ::decodeAddress ( 1424parameterBlock .parameterBuffer , 1425parameterBlock .parameterBufferSize , 1426typeId ); 1427readByte += ParameterDecoder ::decodeAddress ( 1428parameterBlock .parameterBuffer + readByte , 1429parameterBlock .parameterBufferSize - readByte , 1430interfaceTypeId ); 1431 1432uint32_t outSequentialId = 0 ; 1433for (auto consumer :m_consumers ) 1434 { 1435consumer -> ISession_getTypeConformanceWitnessSequentialID ( 1436objectId , 1437typeId , 1438interfaceTypeId , 1439outSequentialId ); 1440 } 1441} 1442 1443void SlangDecoder ::ISession_createTypeConformanceComponentType ( 1444ObjectID objectId , 1445ParameterBlock const & parameterBlock ) 1446{ 1447slangRecordLog ( 1448LogLevel ::Error , 1449"%s: The shader reflection app is not recordd\n" , 1450__PRETTY_FUNCTION__ ); 1451 1452size_t readByte = 0 ; 1453ObjectID typeId = 0 ; 1454ObjectID interfaceTypeId = 0 ; 1455int64_t conformanceIdOverride = 0 ; 1456readByte = ParameterDecoder ::decodeAddress ( 1457parameterBlock .parameterBuffer , 1458parameterBlock .parameterBufferSize , 1459typeId ); 1460readByte += ParameterDecoder ::decodeAddress ( 1461parameterBlock .parameterBuffer + readByte , 1462parameterBlock .parameterBufferSize - readByte , 1463interfaceTypeId ); 1464readByte += ParameterDecoder ::decodeInt64 ( 1465parameterBlock .parameterBuffer + readByte , 1466parameterBlock .parameterBufferSize - readByte , 1467conformanceIdOverride ); 1468 1469ObjectID outDiagnosticsId = 0 ; 1470ObjectID outConformanceId = 0 ; 1471readByte = ParameterDecoder ::decodeAddress ( 1472parameterBlock .outputBuffer + readByte , 1473parameterBlock .outputBufferSize , 1474outConformanceId ); 1475readByte += ParameterDecoder ::decodeAddress ( 1476parameterBlock .outputBuffer + readByte , 1477parameterBlock .outputBufferSize - readByte , 1478outDiagnosticsId ); 1479 1480for (auto consumer :m_consumers ) 1481 { 1482consumer -> ISession_createTypeConformanceComponentType ( 1483objectId , 1484typeId , 1485interfaceTypeId , 1486conformanceIdOverride , 1487outConformanceId , 1488outDiagnosticsId ); 1489 } 1490} 1491 1492void SlangDecoder ::ISession_createCompileRequest ( 1493ObjectID objectId , 1494ParameterBlock const & parameterBlock ) 1495{ 1496ObjectID outCompileRequestId = 0 ; 1497ParameterDecoder ::decodeAddress ( 1498parameterBlock .outputBuffer , 1499parameterBlock .outputBufferSize , 1500outCompileRequestId ); 1501 1502for (auto consumer :m_consumers ) 1503 { 1504consumer -> ISession_createCompileRequest (objectId ,outCompileRequestId ); 1505 } 1506} 1507 1508void SlangDecoder ::ISession_getLoadedModuleCount ( 1509ObjectID objectId , 1510ParameterBlock const & parameterBlock ) 1511{ 1512 (void )objectId ; 1513 (void )parameterBlock ; 1514slangRecordLog ( 1515LogLevel ::Debug , 1516"%s should not be called, it'a not recordd\n" , 1517__PRETTY_FUNCTION__ ); 1518} 1519 1520void SlangDecoder ::ISession_getLoadedModule (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1521{ 1522int64_t index = 0 ; 1523ParameterDecoder ::decodeInt64 ( 1524parameterBlock .parameterBuffer , 1525parameterBlock .parameterBufferSize , 1526index ); 1527 1528ObjectID outModuleId = 0 ; 1529ParameterDecoder ::decodeAddress ( 1530parameterBlock .outputBuffer , 1531parameterBlock .outputBufferSize , 1532outModuleId ); 1533 1534for (auto consumer :m_consumers ) 1535 { 1536consumer -> ISession_getLoadedModule (objectId ,index ,outModuleId ); 1537 } 1538} 1539 1540void SlangDecoder ::ISession_isBinaryModuleUpToDate ( 1541ObjectID objectId , 1542ParameterBlock const & parameterBlock ) 1543{ 1544 (void )objectId ; 1545 (void )parameterBlock ; 1546slangRecordLog ( 1547LogLevel ::Debug , 1548"%s should not be called, it'a not recordd\n" , 1549__PRETTY_FUNCTION__ ); 1550} 1551 1552 1553void SlangDecoder ::IModule_findEntryPointByName ( 1554ObjectID objectId , 1555ParameterBlock const & parameterBlock ) 1556{ 1557StringDecoder name ; 1558ParameterDecoder ::decodeString ( 1559parameterBlock .parameterBuffer , 1560parameterBlock .parameterBufferSize , 1561name ); 1562 1563ObjectID outEntryPointId = 0 ; 1564ParameterDecoder ::decodeAddress ( 1565parameterBlock .outputBuffer , 1566parameterBlock .outputBufferSize , 1567outEntryPointId ); 1568 1569for (auto consumer :m_consumers ) 1570 { 1571consumer -> IModule_findEntryPointByName (objectId ,name .getPointer (),outEntryPointId ); 1572 } 1573} 1574 1575void SlangDecoder ::IModule_getDefinedEntryPointCount ( 1576ObjectID objectId , 1577ParameterBlock const & parameterBlock ) 1578{ 1579 (void )objectId ; 1580 (void )parameterBlock ; 1581slangRecordLog ( 1582LogLevel ::Debug , 1583"%s should not be called, it'a not recordd\n" , 1584__PRETTY_FUNCTION__ ); 1585} 1586 1587void SlangDecoder ::IModule_getDefinedEntryPoint ( 1588ObjectID objectId , 1589ParameterBlock const & parameterBlock ) 1590{ 1591int32_t index ; 1592ObjectID outEntryPointId = 0 ; 1593ParameterDecoder ::decodeInt32 ( 1594parameterBlock .parameterBuffer , 1595parameterBlock .parameterBufferSize , 1596index ); 1597ParameterDecoder ::decodeAddress ( 1598parameterBlock .outputBuffer , 1599parameterBlock .outputBufferSize , 1600outEntryPointId ); 1601 1602for (auto consumer :m_consumers ) 1603 { 1604consumer -> IModule_getDefinedEntryPoint (objectId ,index ,outEntryPointId ); 1605 } 1606} 1607 1608void SlangDecoder ::IModule_serialize (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1609{ 1610ObjectID outSerializedBlobId = 0 ; 1611ParameterDecoder ::decodeAddress ( 1612parameterBlock .outputBuffer , 1613parameterBlock .outputBufferSize , 1614outSerializedBlobId ); 1615 1616for (auto consumer :m_consumers ) 1617 { 1618consumer -> IModule_serialize (objectId ,outSerializedBlobId ); 1619 } 1620} 1621 1622void SlangDecoder ::IModule_writeToFile (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1623{ 1624StringDecoder fileName ; 1625ParameterDecoder ::decodeString ( 1626parameterBlock .parameterBuffer , 1627parameterBlock .parameterBufferSize , 1628fileName ); 1629 1630for (auto consumer :m_consumers ) 1631 { 1632consumer -> IModule_writeToFile (objectId ,fileName .getPointer ()); 1633 } 1634} 1635 1636void SlangDecoder ::IModule_getName (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1637{ 1638 (void )objectId ; 1639 (void )parameterBlock ; 1640slangRecordLog ( 1641LogLevel ::Debug , 1642"%s should not be called, it'a not recordd\n" , 1643__PRETTY_FUNCTION__ ); 1644} 1645 1646void SlangDecoder ::IModule_getFilePath (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1647{ 1648 (void )objectId ; 1649 (void )parameterBlock ; 1650slangRecordLog ( 1651LogLevel ::Debug , 1652"%s should not be called, it'a not recordd\n" , 1653__PRETTY_FUNCTION__ ); 1654} 1655 1656void SlangDecoder ::IModule_getUniqueIdentity ( 1657ObjectID objectId , 1658ParameterBlock const & parameterBlock ) 1659{ 1660 (void )objectId ; 1661 (void )parameterBlock ; 1662slangRecordLog ( 1663LogLevel ::Debug , 1664"%s should not be called, it'a not recordd\n" , 1665__PRETTY_FUNCTION__ ); 1666} 1667 1668void SlangDecoder ::IModule_findAndCheckEntryPoint ( 1669ObjectID objectId , 1670ParameterBlock const & parameterBlock ) 1671{ 1672StringDecoder name ; 1673SlangStage stage {}; 1674size_t readByte = 0 ; 1675readByte = ParameterDecoder ::decodeString ( 1676parameterBlock .parameterBuffer , 1677parameterBlock .parameterBufferSize , 1678name ); 1679readByte += ParameterDecoder ::decodeEnumValue ( 1680parameterBlock .parameterBuffer + readByte , 1681parameterBlock .parameterBufferSize - readByte , 1682stage ); 1683 1684ObjectID outEntryPointId = 0 ; 1685ObjectID outDiagnosticsId = 0 ; 1686readByte = ParameterDecoder ::decodeAddress ( 1687parameterBlock .outputBuffer , 1688parameterBlock .outputBufferSize , 1689outEntryPointId ); 1690readByte += ParameterDecoder ::decodeAddress ( 1691parameterBlock .outputBuffer + readByte , 1692parameterBlock .outputBufferSize - readByte , 1693outDiagnosticsId ); 1694 1695for (auto consumer :m_consumers ) 1696 { 1697consumer -> IModule_findAndCheckEntryPoint ( 1698objectId , 1699name .getPointer (), 1700stage , 1701outEntryPointId , 1702outDiagnosticsId ); 1703 } 1704} 1705 1706void SlangDecoder ::IModule_getSession (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1707{ 1708 (void )objectId ; 1709 (void )parameterBlock ; 1710slangRecordLog ( 1711LogLevel ::Debug , 1712"%s should not be called, it'a not recordd\n" , 1713__PRETTY_FUNCTION__ ); 1714} 1715 1716void SlangDecoder ::IModule_getLayout (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1717{ 1718int64_t targetIndex = 0 ; 1719ParameterDecoder ::decodeInt64 ( 1720parameterBlock .parameterBuffer , 1721parameterBlock .parameterBufferSize , 1722targetIndex ); 1723ObjectID outDiagnosticsId = 0 ; 1724ObjectID programLayoutId = 0 ; 1725 1726size_t readByte = 0 ; 1727readByte = ParameterDecoder ::decodeAddress ( 1728parameterBlock .outputBuffer , 1729parameterBlock .outputBufferSize , 1730outDiagnosticsId ); 1731readByte += ParameterDecoder ::decodeAddress ( 1732parameterBlock .outputBuffer + readByte , 1733parameterBlock .outputBufferSize - readByte , 1734programLayoutId ); 1735 1736for (auto consumer :m_consumers ) 1737 { 1738consumer -> IModule_getLayout (objectId ,targetIndex ,outDiagnosticsId ,programLayoutId ); 1739 } 1740} 1741 1742void SlangDecoder ::IModule_getSpecializationParamCount ( 1743ObjectID objectId , 1744ParameterBlock const & parameterBlock ) 1745{ 1746 (void )objectId ; 1747 (void )parameterBlock ; 1748slangRecordLog ( 1749LogLevel ::Debug , 1750"%s should not be called, it'a not recordd\n" , 1751__PRETTY_FUNCTION__ ); 1752} 1753 1754void SlangDecoder ::IModule_getEntryPointCode ( 1755ObjectID objectId , 1756ParameterBlock const & parameterBlock ) 1757{ 1758size_t readByte = 0 ; 1759int64_t entryPointIndex = 0 ; 1760int64_t targetIndex = 0 ; 1761readByte = ParameterDecoder ::decodeInt64 ( 1762parameterBlock .parameterBuffer , 1763parameterBlock .parameterBufferSize , 1764entryPointIndex ); 1765readByte += ParameterDecoder ::decodeInt64 ( 1766parameterBlock .parameterBuffer + readByte , 1767parameterBlock .parameterBufferSize - readByte , 1768targetIndex ); 1769 1770ObjectID outCodeId = 0 ; 1771ObjectID outDiagnosticsId = 0 ; 1772readByte = ParameterDecoder ::decodeAddress ( 1773parameterBlock .outputBuffer , 1774parameterBlock .outputBufferSize , 1775outCodeId ); 1776readByte += ParameterDecoder ::decodeAddress ( 1777parameterBlock .outputBuffer + readByte , 1778parameterBlock .outputBufferSize - readByte , 1779outDiagnosticsId ); 1780 1781for (auto consumer :m_consumers ) 1782 { 1783consumer -> IModule_getEntryPointCode ( 1784objectId , 1785entryPointIndex , 1786targetIndex , 1787outCodeId , 1788outDiagnosticsId ); 1789 } 1790} 1791 1792void SlangDecoder ::IModule_getTargetCode (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1793{ 1794size_t readByte = 0 ; 1795int64_t targetIndex = 0 ; 1796readByte = ParameterDecoder ::decodeInt64 ( 1797parameterBlock .parameterBuffer , 1798parameterBlock .parameterBufferSize , 1799targetIndex ); 1800 1801ObjectID outCodeId = 0 ; 1802ObjectID outDiagnosticsId = 0 ; 1803readByte = ParameterDecoder ::decodeAddress ( 1804parameterBlock .outputBuffer , 1805parameterBlock .outputBufferSize , 1806outCodeId ); 1807readByte += ParameterDecoder ::decodeAddress ( 1808parameterBlock .outputBuffer + readByte , 1809parameterBlock .outputBufferSize - readByte , 1810outDiagnosticsId ); 1811 1812for (auto consumer :m_consumers ) 1813 { 1814consumer -> IModule_getTargetCode (objectId ,targetIndex ,outCodeId ,outDiagnosticsId ); 1815 } 1816} 1817 1818void SlangDecoder ::IModule_getResultAsFileSystem ( 1819ObjectID objectId , 1820ParameterBlock const & parameterBlock ) 1821{ 1822size_t readByte = 0 ; 1823int64_t entryPointIndex = 0 ; 1824int64_t targetIndex = 0 ; 1825readByte = ParameterDecoder ::decodeInt64 ( 1826parameterBlock .parameterBuffer , 1827parameterBlock .parameterBufferSize , 1828entryPointIndex ); 1829readByte += ParameterDecoder ::decodeInt64 ( 1830parameterBlock .parameterBuffer + readByte , 1831parameterBlock .parameterBufferSize - readByte , 1832targetIndex ); 1833 1834ObjectID outFileSystemId = 0 ; 1835readByte = ParameterDecoder ::decodeAddress ( 1836parameterBlock .outputBuffer , 1837parameterBlock .outputBufferSize , 1838outFileSystemId ); 1839 1840for (auto consumer :m_consumers ) 1841 { 1842consumer -> IModule_getResultAsFileSystem ( 1843objectId , 1844entryPointIndex , 1845targetIndex , 1846outFileSystemId ); 1847 } 1848} 1849 1850void SlangDecoder ::IModule_getEntryPointHash ( 1851ObjectID objectId , 1852ParameterBlock const & parameterBlock ) 1853{ 1854size_t readByte = 0 ; 1855int64_t entryPointIndex = 0 ; 1856int64_t targetIndex = 0 ; 1857readByte = ParameterDecoder ::decodeInt64 ( 1858parameterBlock .parameterBuffer , 1859parameterBlock .parameterBufferSize , 1860entryPointIndex ); 1861readByte += ParameterDecoder ::decodeInt64 ( 1862parameterBlock .parameterBuffer + readByte , 1863parameterBlock .parameterBufferSize - readByte , 1864targetIndex ); 1865 1866ObjectID outBlobId = 0 ; 1867readByte = ParameterDecoder ::decodeAddress ( 1868parameterBlock .outputBuffer , 1869parameterBlock .outputBufferSize , 1870outBlobId ); 1871 1872for (auto consumer :m_consumers ) 1873 { 1874consumer -> IModule_getEntryPointHash (objectId ,entryPointIndex ,targetIndex ,outBlobId ); 1875 } 1876} 1877 1878void SlangDecoder ::IModule_specialize (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1879{ 1880slangRecordLog ( 1881LogLevel ::Error , 1882"%s: The shader reflection interfaces are not recordd\n" , 1883__PRETTY_FUNCTION__ ); 1884 1885size_t readByte = 0 ; 1886int64_t specializationArgCount = 0 ; 1887readByte = ParameterDecoder ::decodeInt64 ( 1888parameterBlock .parameterBuffer , 1889parameterBlock .parameterBufferSize , 1890specializationArgCount ); 1891 1892 std::vector < slang::SpecializationArg > specializationArgs ; 1893 1894uint32_t arraySize = 0 ; 1895readByte += ParameterDecoder ::decodeUint32 ( 1896parameterBlock .parameterBuffer + readByte , 1897parameterBlock .parameterBufferSize - readByte , 1898arraySize ); 1899 1900SLANG_RECORD_ASSERT (arraySize == specializationArgCount ); 1901 1902specializationArgs .resize (specializationArgCount ); 1903readByte += ParameterDecoder ::decodeStructArray ( 1904parameterBlock .parameterBuffer + readByte , 1905parameterBlock .parameterBufferSize - readByte , 1906specializationArgs .data (), 1907specializationArgCount ); 1908 1909ObjectID outSpecializedComponentTypeId = 0 ; 1910ObjectID outDiagnosticsId = 0 ; 1911readByte = ParameterDecoder ::decodeAddress ( 1912parameterBlock .outputBuffer , 1913parameterBlock .outputBufferSize , 1914outSpecializedComponentTypeId ); 1915readByte += ParameterDecoder ::decodeAddress ( 1916parameterBlock .outputBuffer + readByte , 1917parameterBlock .outputBufferSize - readByte , 1918outDiagnosticsId ); 1919 1920for (auto consumer :m_consumers ) 1921 { 1922consumer -> IModule_specialize ( 1923objectId , 1924specializationArgs .data (), 1925specializationArgCount , 1926outSpecializedComponentTypeId , 1927outDiagnosticsId ); 1928 } 1929} 1930 1931void SlangDecoder ::IModule_link (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1932{ 1933size_t readByte = 0 ; 1934ObjectID outLinkedComponentTypeId = 0 ; 1935ObjectID outDiagnosticsId = 0 ; 1936readByte = ParameterDecoder ::decodeAddress ( 1937parameterBlock .outputBuffer , 1938parameterBlock .outputBufferSize , 1939outLinkedComponentTypeId ); 1940readByte += ParameterDecoder ::decodeAddress ( 1941parameterBlock .outputBuffer + readByte , 1942parameterBlock .outputBufferSize - readByte , 1943outDiagnosticsId ); 1944 1945for (auto consumer :m_consumers ) 1946 { 1947consumer -> IModule_link (objectId ,outLinkedComponentTypeId ,outDiagnosticsId ); 1948 } 1949} 1950 1951void SlangDecoder ::IModule_getEntryPointHostCallable ( 1952ObjectID objectId , 1953ParameterBlock const & parameterBlock ) 1954{ 1955size_t readByte = 0 ; 1956int32_t entryPointIndex = 0 ; 1957int32_t targetIndex = 0 ; 1958readByte = ParameterDecoder ::decodeInt32 ( 1959parameterBlock .parameterBuffer , 1960parameterBlock .parameterBufferSize , 1961entryPointIndex ); 1962readByte += ParameterDecoder ::decodeInt32 ( 1963parameterBlock .parameterBuffer + readByte , 1964parameterBlock .parameterBufferSize - readByte , 1965targetIndex ); 1966 1967ObjectID outSharedLibraryId = 0 ; 1968ObjectID outDiagnosticsId = 0 ; 1969readByte = ParameterDecoder ::decodeAddress ( 1970parameterBlock .outputBuffer , 1971parameterBlock .outputBufferSize , 1972outSharedLibraryId ); 1973readByte += ParameterDecoder ::decodeAddress ( 1974parameterBlock .outputBuffer + readByte , 1975parameterBlock .outputBufferSize - readByte , 1976outDiagnosticsId ); 1977 1978for (auto consumer :m_consumers ) 1979 { 1980consumer -> IModule_getEntryPointHostCallable ( 1981objectId , 1982entryPointIndex , 1983targetIndex , 1984outSharedLibraryId , 1985outDiagnosticsId ); 1986 } 1987} 1988 1989void SlangDecoder ::IModule_renameEntryPoint (ObjectID objectId ,ParameterBlock const & parameterBlock ) 1990{ 1991StringDecoder newName ; 1992ParameterDecoder ::decodeString ( 1993parameterBlock .parameterBuffer , 1994parameterBlock .parameterBufferSize , 1995newName ); 1996 1997ObjectID outEntryPointId = 0 ; 1998ParameterDecoder ::decodeAddress ( 1999parameterBlock .outputBuffer , 2000parameterBlock .outputBufferSize , 2001outEntryPointId ); 2002 2003for (auto consumer :m_consumers ) 2004 { 2005consumer -> IModule_renameEntryPoint (objectId ,newName .getPointer (),outEntryPointId ); 2006 } 2007} 2008 2009void SlangDecoder ::IModule_linkWithOptions (ObjectID objectId ,ParameterBlock const & parameterBlock ) 2010{ 2011size_t readByte = 0 ; 2012uint32_t compilerOptionEntryCount = 0 ; 2013readByte = ParameterDecoder ::decodeUint32 ( 2014parameterBlock .parameterBuffer , 2015parameterBlock .parameterBufferSize , 2016compilerOptionEntryCount ); 2017 2018 std::vector < slang::CompilerOptionEntry > compilerOptionEntries ; 2019 2020uint32_t arrayCount = 0 ; 2021readByte += ParameterDecoder ::decodeUint32 ( 2022parameterBlock .parameterBuffer + readByte , 2023parameterBlock .parameterBufferSize - readByte , 2024arrayCount ); 2025 2026SLANG_RECORD_ASSERT (arrayCount == compilerOptionEntryCount ); 2027compilerOptionEntries .resize (compilerOptionEntryCount ); 2028 2029readByte += ParameterDecoder ::decodeStructArray ( 2030parameterBlock .parameterBuffer + readByte , 2031parameterBlock .parameterBufferSize - readByte , 2032compilerOptionEntries .data (), 2033compilerOptionEntryCount ); 2034 2035ObjectID outLinkedComponentTypeId = 0 ; 2036ObjectID outDiagnosticsId = 0 ; 2037readByte = ParameterDecoder ::decodeAddress ( 2038parameterBlock .outputBuffer , 2039parameterBlock .outputBufferSize , 2040outLinkedComponentTypeId ); 2041readByte += ParameterDecoder ::decodeAddress ( 2042parameterBlock .outputBuffer + readByte , 2043parameterBlock .outputBufferSize - readByte , 2044outDiagnosticsId ); 2045 2046for (auto consumer :m_consumers ) 2047 { 2048consumer -> IModule_linkWithOptions ( 2049objectId , 2050outLinkedComponentTypeId , 2051compilerOptionEntryCount , 2052compilerOptionEntries .data (), 2053outDiagnosticsId ); 2054 } 2055} 2056 2057void SlangDecoder ::IEntryPoint_getSession (ObjectID objectId ,ParameterBlock const & parameterBlock ) 2058{ 2059 (void )objectId ; 2060 (void )parameterBlock ; 2061slangRecordLog ( 2062LogLevel ::Debug , 2063"%s should not be called, it'a not recordd\n" , 2064__PRETTY_FUNCTION__ ); 2065} 2066 2067void SlangDecoder ::IEntryPoint_getLayout (ObjectID objectId ,ParameterBlock const & parameterBlock ) 2068{ 2069int64_t targetIndex = 0 ; 2070ParameterDecoder ::decodeInt64 ( 2071parameterBlock .parameterBuffer , 2072parameterBlock .parameterBufferSize , 2073targetIndex ); 2074 2075ObjectID outDiagnosticsId = 0 ; 2076ObjectID programLayoutId = 0 ; 2077 2078size_t readByte = 0 ; 2079readByte = ParameterDecoder ::decodeAddress ( 2080parameterBlock .outputBuffer , 2081parameterBlock .outputBufferSize , 2082outDiagnosticsId ); 2083readByte += ParameterDecoder ::decodeAddress ( 2084parameterBlock .outputBuffer + readByte , 2085parameterBlock .outputBufferSize - readByte , 2086programLayoutId ); 2087 2088for (auto consumer :m_consumers ) 2089 { 2090consumer -> IEntryPoint_getLayout (objectId ,targetIndex ,outDiagnosticsId ,programLayoutId ); 2091 } 2092} 2093 2094void SlangDecoder ::IEntryPoint_getSpecializationParamCount ( 2095ObjectID objectId , 2096ParameterBlock const & parameterBlock ) 2097{ 2098 (void )objectId ; 2099 (void )parameterBlock ; 2100slangRecordLog ( 2101LogLevel ::Debug , 2102"%s should not be called, it'a not recordd\n" , 2103__PRETTY_FUNCTION__ ); 2104} 2105 2106void SlangDecoder ::IEntryPoint_getEntryPointCode ( 2107ObjectID objectId , 2108ParameterBlock const & parameterBlock ) 2109{ 2110size_t readByte = 0 ; 2111int64_t entryPointIndex = 0 ; 2112int64_t targetIndex = 0 ; 2113readByte = ParameterDecoder ::decodeInt64 ( 2114parameterBlock .parameterBuffer , 2115parameterBlock .parameterBufferSize , 2116entryPointIndex ); 2117readByte += ParameterDecoder ::decodeInt64 ( 2118parameterBlock .parameterBuffer + readByte , 2119parameterBlock .parameterBufferSize - readByte , 2120targetIndex ); 2121 2122ObjectID outCodeId = 0 ; 2123ObjectID outDiagnosticsId = 0 ; 2124readByte = ParameterDecoder ::decodeAddress ( 2125parameterBlock .outputBuffer , 2126parameterBlock .outputBufferSize , 2127outCodeId ); 2128readByte += ParameterDecoder ::decodeAddress ( 2129parameterBlock .outputBuffer + readByte , 2130parameterBlock .outputBufferSize - readByte , 2131outDiagnosticsId ); 2132 2133for (auto consumer :m_consumers ) 2134 { 2135consumer -> IEntryPoint_getEntryPointCode ( 2136objectId , 2137entryPointIndex , 2138targetIndex , 2139outCodeId , 2140outDiagnosticsId ); 2141 } 2142} 2143 2144void SlangDecoder ::IEntryPoint_getTargetCode ( 2145ObjectID objectId , 2146ParameterBlock const & parameterBlock ) 2147{ 2148size_t readByte = 0 ; 2149int64_t targetIndex = 0 ; 2150readByte = ParameterDecoder ::decodeInt64 ( 2151parameterBlock .parameterBuffer , 2152parameterBlock .parameterBufferSize , 2153targetIndex ); 2154 2155ObjectID outCodeId = 0 ; 2156ObjectID outDiagnosticsId = 0 ; 2157readByte = ParameterDecoder ::decodeAddress ( 2158parameterBlock .outputBuffer , 2159parameterBlock .outputBufferSize , 2160outCodeId ); 2161readByte += ParameterDecoder ::decodeAddress ( 2162parameterBlock .outputBuffer + readByte , 2163parameterBlock .outputBufferSize - readByte , 2164outDiagnosticsId ); 2165 2166for (auto consumer :m_consumers ) 2167 { 2168consumer -> IEntryPoint_getTargetCode (objectId ,targetIndex ,outCodeId ,outDiagnosticsId ); 2169 } 2170} 2171 2172void SlangDecoder ::IEntryPoint_getResultAsFileSystem ( 2173ObjectID objectId , 2174ParameterBlock const & parameterBlock ) 2175{ 2176size_t readByte = 0 ; 2177int64_t entryPointIndex = 0 ; 2178int64_t targetIndex = 0 ; 2179readByte = ParameterDecoder ::decodeInt64 ( 2180parameterBlock .parameterBuffer , 2181parameterBlock .parameterBufferSize , 2182entryPointIndex ); 2183readByte += ParameterDecoder ::decodeInt64 ( 2184parameterBlock .parameterBuffer + readByte , 2185parameterBlock .parameterBufferSize - readByte , 2186targetIndex ); 2187 2188ObjectID outFileSystemId = 0 ; 2189readByte = ParameterDecoder ::decodeAddress ( 2190parameterBlock .outputBuffer , 2191parameterBlock .outputBufferSize , 2192outFileSystemId ); 2193 2194for (auto consumer :m_consumers ) 2195 { 2196consumer -> IEntryPoint_getResultAsFileSystem ( 2197objectId , 2198entryPointIndex , 2199targetIndex , 2200outFileSystemId ); 2201 } 2202} 2203 2204void SlangDecoder ::IEntryPoint_getEntryPointHash ( 2205ObjectID objectId , 2206ParameterBlock const & parameterBlock ) 2207{ 2208size_t readByte = 0 ; 2209int64_t entryPointIndex = 0 ; 2210int64_t targetIndex = 0 ; 2211readByte = ParameterDecoder ::decodeInt64 ( 2212parameterBlock .parameterBuffer , 2213parameterBlock .parameterBufferSize , 2214entryPointIndex ); 2215readByte += ParameterDecoder ::decodeInt64 ( 2216parameterBlock .parameterBuffer + readByte , 2217parameterBlock .parameterBufferSize - readByte , 2218targetIndex ); 2219 2220ObjectID outBlobId = 0 ; 2221readByte = ParameterDecoder ::decodeAddress ( 2222parameterBlock .outputBuffer , 2223parameterBlock .outputBufferSize , 2224outBlobId ); 2225 2226for (auto consumer :m_consumers ) 2227 { 2228consumer -> IEntryPoint_getEntryPointHash (objectId ,entryPointIndex ,targetIndex ,outBlobId ); 2229 } 2230} 2231 2232void SlangDecoder ::IEntryPoint_specialize (ObjectID objectId ,ParameterBlock const & parameterBlock ) 2233{ 2234slangRecordLog ( 2235LogLevel ::Error , 2236"%s: The shader reflection interfaces are not recordd\n" , 2237__PRETTY_FUNCTION__ ); 2238 2239size_t readByte = 0 ; 2240int64_t specializationArgCount = 0 ; 2241readByte = ParameterDecoder ::decodeInt64 ( 2242parameterBlock .parameterBuffer , 2243parameterBlock .parameterBufferSize , 2244specializationArgCount ); 2245 2246 std::vector < slang::SpecializationArg > specializationArgs ; 2247 2248uint32_t arraySize = 0 ; 2249readByte += ParameterDecoder ::decodeUint32 ( 2250parameterBlock .parameterBuffer + readByte , 2251parameterBlock .parameterBufferSize - readByte , 2252arraySize ); 2253 2254SLANG_RECORD_ASSERT (arraySize == specializationArgCount ); 2255 2256specializationArgs .resize (specializationArgCount ); 2257readByte += ParameterDecoder ::decodeStructArray ( 2258parameterBlock .parameterBuffer + readByte , 2259parameterBlock .parameterBufferSize - readByte , 2260specializationArgs .data (), 2261specializationArgCount ); 2262 2263ObjectID outSpecializedComponentTypeId = 0 ; 2264ObjectID outDiagnosticsId = 0 ; 2265readByte = ParameterDecoder ::decodeAddress ( 2266parameterBlock .outputBuffer , 2267parameterBlock .outputBufferSize , 2268outSpecializedComponentTypeId ); 2269readByte += ParameterDecoder ::decodeAddress ( 2270parameterBlock .outputBuffer + readByte , 2271parameterBlock .outputBufferSize - readByte , 2272outDiagnosticsId ); 2273 2274for (auto consumer :m_consumers ) 2275 { 2276consumer -> IEntryPoint_specialize ( 2277objectId , 2278specializationArgs .data (), 2279specializationArgCount , 2280outSpecializedComponentTypeId , 2281outDiagnosticsId ); 2282 } 2283} 2284 2285void SlangDecoder ::IEntryPoint_link (ObjectID objectId ,ParameterBlock const & parameterBlock ) 2286{ 2287size_t readByte = 0 ; 2288ObjectID outLinkedComponentTypeId = 0 ; 2289ObjectID outDiagnosticsId = 0 ; 2290readByte = ParameterDecoder ::decodeAddress ( 2291parameterBlock .outputBuffer , 2292parameterBlock .outputBufferSize , 2293outLinkedComponentTypeId ); 2294readByte += ParameterDecoder ::decodeAddress ( 2295parameterBlock .outputBuffer + readByte , 2296parameterBlock .outputBufferSize - readByte , 2297outDiagnosticsId ); 2298 2299for (auto consumer :m_consumers ) 2300 { 2301consumer -> IEntryPoint_link (objectId ,outLinkedComponentTypeId ,outDiagnosticsId ); 2302 } 2303} 2304 2305void SlangDecoder ::IEntryPoint_getEntryPointHostCallable ( 2306ObjectID objectId , 2307ParameterBlock const & parameterBlock ) 2308{ 2309size_t readByte = 0 ; 2310int32_t entryPointIndex = 0 ; 2311int32_t targetIndex = 0 ; 2312readByte = ParameterDecoder ::decodeInt32 ( 2313parameterBlock .parameterBuffer , 2314parameterBlock .parameterBufferSize , 2315entryPointIndex ); 2316readByte += ParameterDecoder ::decodeInt32 ( 2317parameterBlock .parameterBuffer + readByte , 2318parameterBlock .parameterBufferSize - readByte , 2319targetIndex ); 2320 2321ObjectID outSharedLibraryId = 0 ; 2322ObjectID outDiagnosticsId = 0 ; 2323readByte = ParameterDecoder ::decodeAddress ( 2324parameterBlock .outputBuffer , 2325parameterBlock .outputBufferSize , 2326outSharedLibraryId ); 2327readByte += ParameterDecoder ::decodeAddress ( 2328parameterBlock .outputBuffer + readByte , 2329parameterBlock .outputBufferSize - readByte , 2330outDiagnosticsId ); 2331 2332for (auto consumer :m_consumers ) 2333 { 2334consumer -> IEntryPoint_getEntryPointHostCallable ( 2335objectId , 2336entryPointIndex , 2337targetIndex , 2338outSharedLibraryId , 2339outDiagnosticsId ); 2340 } 2341} 2342 2343void SlangDecoder ::IEntryPoint_renameEntryPoint ( 2344ObjectID objectId , 2345ParameterBlock const & parameterBlock ) 2346{ 2347StringDecoder newName ; 2348ParameterDecoder ::decodeString ( 2349parameterBlock .parameterBuffer , 2350parameterBlock .parameterBufferSize , 2351newName ); 2352 2353ObjectID outEntryPointId = 0 ; 2354ParameterDecoder ::decodeAddress ( 2355parameterBlock .outputBuffer , 2356parameterBlock .outputBufferSize , 2357outEntryPointId ); 2358 2359for (auto consumer :m_consumers ) 2360 { 2361consumer -> IEntryPoint_renameEntryPoint (objectId ,newName .getPointer (),outEntryPointId ); 2362 } 2363} 2364 2365void SlangDecoder ::IEntryPoint_linkWithOptions ( 2366ObjectID objectId , 2367ParameterBlock const & parameterBlock ) 2368{ 2369size_t readByte = 0 ; 2370uint32_t compilerOptionEntryCount = 0 ; 2371readByte = ParameterDecoder ::decodeUint32 ( 2372parameterBlock .parameterBuffer , 2373parameterBlock .parameterBufferSize , 2374compilerOptionEntryCount ); 2375 2376 std::vector < slang::CompilerOptionEntry > compilerOptionEntries ; 2377 2378uint32_t arrayCount = 0 ; 2379readByte += ParameterDecoder ::decodeUint32 ( 2380parameterBlock .parameterBuffer + readByte , 2381parameterBlock .parameterBufferSize - readByte , 2382arrayCount ); 2383 2384SLANG_RECORD_ASSERT (arrayCount == compilerOptionEntryCount ); 2385compilerOptionEntries .resize (compilerOptionEntryCount ); 2386 2387readByte += ParameterDecoder ::decodeStructArray ( 2388parameterBlock .parameterBuffer + readByte , 2389parameterBlock .parameterBufferSize - readByte , 2390compilerOptionEntries .data (), 2391compilerOptionEntryCount ); 2392 2393ObjectID outLinkedComponentTypeId = 0 ; 2394ObjectID outDiagnosticsId = 0 ; 2395readByte = ParameterDecoder ::decodeAddress ( 2396parameterBlock .outputBuffer , 2397parameterBlock .outputBufferSize , 2398outLinkedComponentTypeId ); 2399readByte += ParameterDecoder ::decodeAddress ( 2400parameterBlock .outputBuffer + readByte , 2401parameterBlock .outputBufferSize - readByte , 2402outDiagnosticsId ); 2403 2404for (auto consumer :m_consumers ) 2405 { 2406consumer -> IEntryPoint_linkWithOptions ( 2407objectId , 2408outLinkedComponentTypeId , 2409compilerOptionEntryCount , 2410compilerOptionEntries .data (), 2411outDiagnosticsId ); 2412 } 2413} 2414 2415 2416void SlangDecoder ::ICompositeComponentType_getSession ( 2417ObjectID objectId , 2418ParameterBlock const & parameterBlock ) 2419{ 2420 (void )objectId ; 2421 (void )parameterBlock ; 2422slangRecordLog ( 2423LogLevel ::Debug , 2424"%s should not be called, it'a not recordd\n" , 2425__PRETTY_FUNCTION__ ); 2426} 2427 2428void SlangDecoder ::ICompositeComponentType_getLayout ( 2429ObjectID objectId , 2430ParameterBlock const & parameterBlock ) 2431{ 2432int64_t targetIndex = 0 ; 2433ParameterDecoder ::decodeInt64 ( 2434parameterBlock .parameterBuffer , 2435parameterBlock .parameterBufferSize , 2436targetIndex ); 2437ObjectID outDiagnosticsId = 0 ; 2438ObjectID programLayoutId = 0 ; 2439 2440size_t readByte = 0 ; 2441readByte = ParameterDecoder ::decodeAddress ( 2442parameterBlock .outputBuffer , 2443parameterBlock .outputBufferSize , 2444outDiagnosticsId ); 2445readByte += ParameterDecoder ::decodeAddress ( 2446parameterBlock .outputBuffer + readByte , 2447parameterBlock .outputBufferSize - readByte , 2448programLayoutId ); 2449 2450for (auto consumer :m_consumers ) 2451 { 2452consumer -> ICompositeComponentType_getLayout ( 2453objectId , 2454targetIndex , 2455outDiagnosticsId , 2456programLayoutId ); 2457 } 2458} 2459 2460void SlangDecoder ::ICompositeComponentType_getSpecializationParamCount ( 2461ObjectID objectId , 2462ParameterBlock const & parameterBlock ) 2463{ 2464 (void )objectId ; 2465 (void )parameterBlock ; 2466slangRecordLog ( 2467LogLevel ::Debug , 2468"%s should not be called, it'a not recordd\n" , 2469__PRETTY_FUNCTION__ ); 2470} 2471 2472void SlangDecoder ::ICompositeComponentType_getEntryPointCode ( 2473ObjectID objectId , 2474ParameterBlock const & parameterBlock ) 2475{ 2476size_t readByte = 0 ; 2477int64_t entryPointIndex = 0 ; 2478int64_t targetIndex = 0 ; 2479readByte = ParameterDecoder ::decodeInt64 ( 2480parameterBlock .parameterBuffer , 2481parameterBlock .parameterBufferSize , 2482entryPointIndex ); 2483readByte += ParameterDecoder ::decodeInt64 ( 2484parameterBlock .parameterBuffer + readByte , 2485parameterBlock .parameterBufferSize - readByte , 2486targetIndex ); 2487 2488ObjectID outCodeId = 0 ; 2489ObjectID outDiagnosticsId = 0 ; 2490readByte = ParameterDecoder ::decodeAddress ( 2491parameterBlock .outputBuffer , 2492parameterBlock .outputBufferSize , 2493outCodeId ); 2494readByte += ParameterDecoder ::decodeAddress ( 2495parameterBlock .outputBuffer + readByte , 2496parameterBlock .outputBufferSize - readByte , 2497outDiagnosticsId ); 2498 2499for (auto consumer :m_consumers ) 2500 { 2501consumer -> ICompositeComponentType_getEntryPointCode ( 2502objectId , 2503entryPointIndex , 2504targetIndex , 2505outCodeId , 2506outDiagnosticsId ); 2507 } 2508} 2509 2510void SlangDecoder ::ICompositeComponentType_getTargetCode ( 2511ObjectID objectId , 2512ParameterBlock const & parameterBlock ) 2513{ 2514size_t readByte = 0 ; 2515int64_t targetIndex = 0 ; 2516readByte = ParameterDecoder ::decodeInt64 ( 2517parameterBlock .parameterBuffer , 2518parameterBlock .parameterBufferSize , 2519targetIndex ); 2520 2521ObjectID outCodeId = 0 ; 2522ObjectID outDiagnosticsId = 0 ; 2523readByte = ParameterDecoder ::decodeAddress ( 2524parameterBlock .outputBuffer , 2525parameterBlock .outputBufferSize , 2526outCodeId ); 2527readByte += ParameterDecoder ::decodeAddress ( 2528parameterBlock .outputBuffer + readByte , 2529parameterBlock .outputBufferSize - readByte , 2530outDiagnosticsId ); 2531 2532for (auto consumer :m_consumers ) 2533 { 2534consumer -> ICompositeComponentType_getTargetCode ( 2535objectId , 2536targetIndex , 2537outCodeId , 2538outDiagnosticsId ); 2539 } 2540} 2541 2542void SlangDecoder ::ICompositeComponentType_getResultAsFileSystem ( 2543ObjectID objectId , 2544ParameterBlock const & parameterBlock ) 2545{ 2546size_t readByte = 0 ; 2547int64_t entryPointIndex = 0 ; 2548int64_t targetIndex = 0 ; 2549readByte = ParameterDecoder ::decodeInt64 ( 2550parameterBlock .parameterBuffer , 2551parameterBlock .parameterBufferSize , 2552entryPointIndex ); 2553readByte += ParameterDecoder ::decodeInt64 ( 2554parameterBlock .parameterBuffer + readByte , 2555parameterBlock .parameterBufferSize - readByte , 2556targetIndex ); 2557 2558ObjectID outFileSystemId = 0 ; 2559readByte = ParameterDecoder ::decodeAddress ( 2560parameterBlock .outputBuffer , 2561parameterBlock .outputBufferSize , 2562outFileSystemId ); 2563 2564for (auto consumer :m_consumers ) 2565 { 2566consumer -> ICompositeComponentType_getResultAsFileSystem ( 2567objectId , 2568entryPointIndex , 2569targetIndex , 2570outFileSystemId ); 2571 } 2572} 2573 2574void SlangDecoder ::ICompositeComponentType_getEntryPointHash ( 2575ObjectID objectId , 2576ParameterBlock const & parameterBlock ) 2577{ 2578size_t readByte = 0 ; 2579int64_t entryPointIndex = 0 ; 2580int64_t targetIndex = 0 ; 2581readByte = ParameterDecoder ::decodeInt64 ( 2582parameterBlock .parameterBuffer , 2583parameterBlock .parameterBufferSize , 2584entryPointIndex ); 2585readByte += ParameterDecoder ::decodeInt64 ( 2586parameterBlock .parameterBuffer + readByte , 2587parameterBlock .parameterBufferSize - readByte , 2588targetIndex ); 2589 2590ObjectID outBlobId = 0 ; 2591readByte = ParameterDecoder ::decodeAddress ( 2592parameterBlock .outputBuffer , 2593parameterBlock .outputBufferSize , 2594outBlobId ); 2595 2596for (auto consumer :m_consumers ) 2597 { 2598consumer -> ICompositeComponentType_getEntryPointHash ( 2599objectId , 2600entryPointIndex , 2601targetIndex , 2602outBlobId ); 2603 } 2604} 2605 2606void SlangDecoder ::ICompositeComponentType_specialize ( 2607ObjectID objectId , 2608ParameterBlock const & parameterBlock ) 2609{ 2610slangRecordLog ( 2611LogLevel ::Error , 2612"%s: The shader reflection interfaces are not recordd\n" , 2613__PRETTY_FUNCTION__ ); 2614 2615size_t readByte = 0 ; 2616int64_t specializationArgCount = 0 ; 2617readByte = ParameterDecoder ::decodeInt64 ( 2618parameterBlock .parameterBuffer , 2619parameterBlock .parameterBufferSize , 2620specializationArgCount ); 2621 2622 std::vector < slang::SpecializationArg > specializationArgs ; 2623 2624uint32_t arraySize = 0 ; 2625readByte += ParameterDecoder ::decodeUint32 ( 2626parameterBlock .parameterBuffer + readByte , 2627parameterBlock .parameterBufferSize - readByte , 2628arraySize ); 2629 2630SLANG_RECORD_ASSERT (arraySize == specializationArgCount ); 2631 2632specializationArgs .resize (specializationArgCount ); 2633readByte += ParameterDecoder ::decodeStructArray ( 2634parameterBlock .parameterBuffer + readByte , 2635parameterBlock .parameterBufferSize - readByte , 2636specializationArgs .data (), 2637specializationArgCount ); 2638 2639ObjectID outSpecializedComponentTypeId = 0 ; 2640ObjectID outDiagnosticsId = 0 ; 2641readByte = ParameterDecoder ::decodeAddress ( 2642parameterBlock .outputBuffer , 2643parameterBlock .outputBufferSize , 2644outSpecializedComponentTypeId ); 2645readByte += ParameterDecoder ::decodeAddress ( 2646parameterBlock .outputBuffer + readByte , 2647parameterBlock .outputBufferSize - readByte , 2648outDiagnosticsId ); 2649 2650for (auto consumer :m_consumers ) 2651 { 2652consumer -> ICompositeComponentType_specialize ( 2653objectId , 2654specializationArgs .data (), 2655specializationArgCount , 2656outSpecializedComponentTypeId , 2657outDiagnosticsId ); 2658 } 2659} 2660 2661void SlangDecoder ::ICompositeComponentType_link ( 2662ObjectID objectId , 2663ParameterBlock const & parameterBlock ) 2664{ 2665size_t readByte = 0 ; 2666ObjectID outLinkedComponentTypeId = 0 ; 2667ObjectID outDiagnosticsId = 0 ; 2668readByte = ParameterDecoder ::decodeAddress ( 2669parameterBlock .outputBuffer , 2670parameterBlock .outputBufferSize , 2671outLinkedComponentTypeId ); 2672readByte += ParameterDecoder ::decodeAddress ( 2673parameterBlock .outputBuffer + readByte , 2674parameterBlock .outputBufferSize - readByte , 2675outDiagnosticsId ); 2676 2677for (auto consumer :m_consumers ) 2678 { 2679consumer -> ICompositeComponentType_link ( 2680objectId , 2681outLinkedComponentTypeId , 2682outDiagnosticsId ); 2683 } 2684} 2685 2686void SlangDecoder ::ICompositeComponentType_getEntryPointHostCallable ( 2687ObjectID objectId , 2688ParameterBlock const & parameterBlock ) 2689{ 2690size_t readByte = 0 ; 2691int32_t entryPointIndex = 0 ; 2692int32_t targetIndex = 0 ; 2693readByte = ParameterDecoder ::decodeInt32 ( 2694parameterBlock .parameterBuffer , 2695parameterBlock .parameterBufferSize , 2696entryPointIndex ); 2697readByte += ParameterDecoder ::decodeInt32 ( 2698parameterBlock .parameterBuffer + readByte , 2699parameterBlock .parameterBufferSize - readByte , 2700targetIndex ); 2701 2702ObjectID outSharedLibraryId = 0 ; 2703ObjectID outDiagnosticsId = 0 ; 2704readByte = ParameterDecoder ::decodeAddress ( 2705parameterBlock .outputBuffer , 2706parameterBlock .outputBufferSize , 2707outSharedLibraryId ); 2708readByte += ParameterDecoder ::decodeAddress ( 2709parameterBlock .outputBuffer + readByte , 2710parameterBlock .outputBufferSize - readByte , 2711outDiagnosticsId ); 2712 2713for (auto consumer :m_consumers ) 2714 { 2715consumer -> ICompositeComponentType_getEntryPointHostCallable ( 2716objectId , 2717entryPointIndex , 2718targetIndex , 2719outSharedLibraryId , 2720outDiagnosticsId ); 2721 } 2722} 2723 2724void SlangDecoder ::ICompositeComponentType_renameEntryPoint ( 2725ObjectID objectId , 2726ParameterBlock const & parameterBlock ) 2727{ 2728StringDecoder newName ; 2729ParameterDecoder ::decodeString ( 2730parameterBlock .parameterBuffer , 2731parameterBlock .parameterBufferSize , 2732newName ); 2733 2734ObjectID outEntryPointId = 0 ; 2735ParameterDecoder ::decodeAddress ( 2736parameterBlock .outputBuffer , 2737parameterBlock .outputBufferSize , 2738outEntryPointId ); 2739 2740for (auto consumer :m_consumers ) 2741 { 2742consumer -> ICompositeComponentType_renameEntryPoint ( 2743objectId , 2744newName .getPointer (), 2745outEntryPointId ); 2746 } 2747} 2748 2749void SlangDecoder ::ICompositeComponentType_linkWithOptions ( 2750ObjectID objectId , 2751ParameterBlock const & parameterBlock ) 2752{ 2753size_t readByte = 0 ; 2754uint32_t compilerOptionEntryCount = 0 ; 2755readByte = ParameterDecoder ::decodeUint32 ( 2756parameterBlock .parameterBuffer , 2757parameterBlock .parameterBufferSize , 2758compilerOptionEntryCount ); 2759 2760 std::vector < slang::CompilerOptionEntry > compilerOptionEntries ; 2761 2762uint32_t arrayCount = 0 ; 2763readByte += ParameterDecoder ::decodeUint32 ( 2764parameterBlock .parameterBuffer + readByte , 2765parameterBlock .parameterBufferSize - readByte , 2766arrayCount ); 2767 2768SLANG_RECORD_ASSERT (arrayCount == compilerOptionEntryCount ); 2769compilerOptionEntries .resize (compilerOptionEntryCount ); 2770 2771readByte += ParameterDecoder ::decodeStructArray ( 2772parameterBlock .parameterBuffer + readByte , 2773parameterBlock .parameterBufferSize - readByte , 2774compilerOptionEntries .data (), 2775compilerOptionEntryCount ); 2776 2777ObjectID outLinkedComponentTypeId = 0 ; 2778ObjectID outDiagnosticsId = 0 ; 2779readByte = ParameterDecoder ::decodeAddress ( 2780parameterBlock .outputBuffer , 2781parameterBlock .outputBufferSize , 2782outLinkedComponentTypeId ); 2783readByte += ParameterDecoder ::decodeAddress ( 2784parameterBlock .outputBuffer + readByte , 2785parameterBlock .outputBufferSize - readByte , 2786outDiagnosticsId ); 2787 2788for (auto consumer :m_consumers ) 2789 { 2790consumer -> ICompositeComponentType_linkWithOptions ( 2791objectId , 2792outLinkedComponentTypeId , 2793compilerOptionEntryCount , 2794compilerOptionEntries .data (), 2795outDiagnosticsId ); 2796 } 2797} 2798 2799void SlangDecoder ::ICompositeComponentType_queryInterface ( 2800ObjectID objectId , 2801ParameterBlock const & parameterBlock ) 2802{ 2803size_t readByte = 0 ; 2804 2805// Decode the GUID 2806SlangUUID guid ; 2807readByte = ParameterDecoder ::decodeUint32 ( 2808parameterBlock .parameterBuffer , 2809parameterBlock .parameterBufferSize , 2810guid .data1 ); 2811readByte += ParameterDecoder ::decodeUint16 ( 2812parameterBlock .parameterBuffer + readByte , 2813parameterBlock .parameterBufferSize - readByte , 2814guid .data2 ); 2815readByte += ParameterDecoder ::decodeUint16 ( 2816parameterBlock .parameterBuffer + readByte , 2817parameterBlock .parameterBufferSize - readByte , 2818guid .data3 ); 2819for (int i = 0 ;i < 8 ;i ++ ) 2820 { 2821readByte += ParameterDecoder ::decodeUint8 ( 2822parameterBlock .parameterBuffer + readByte , 2823parameterBlock .parameterBufferSize - readByte , 2824guid .data4 [i ]); 2825 } 2826 2827// Decode the output interface pointer 2828ObjectID outInterfaceId = 0 ; 2829readByte = ParameterDecoder ::decodeAddress ( 2830parameterBlock .outputBuffer , 2831parameterBlock .outputBufferSize , 2832outInterfaceId ); 2833 2834for (auto consumer :m_consumers ) 2835 { 2836consumer -> ICompositeComponentType_queryInterface (objectId ,guid ,outInterfaceId ); 2837 } 2838} 2839 2840void SlangDecoder ::ITypeConformance_getSession ( 2841ObjectID objectId , 2842ParameterBlock const & parameterBlock ) 2843{ 2844 (void )objectId ; 2845 (void )parameterBlock ; 2846slangRecordLog ( 2847LogLevel ::Debug , 2848"%s should not be called, it'a not recordd\n" , 2849__PRETTY_FUNCTION__ ); 2850} 2851 2852void SlangDecoder ::ITypeConformance_getLayout ( 2853ObjectID objectId , 2854ParameterBlock const & parameterBlock ) 2855{ 2856int64_t targetIndex = 0 ; 2857ParameterDecoder ::decodeInt64 ( 2858parameterBlock .parameterBuffer , 2859parameterBlock .parameterBufferSize , 2860targetIndex ); 2861ObjectID outDiagnosticsId = 0 ; 2862ObjectID programLayoutId = 0 ; 2863 2864size_t readByte = 0 ; 2865readByte = ParameterDecoder ::decodeAddress ( 2866parameterBlock .outputBuffer , 2867parameterBlock .outputBufferSize , 2868outDiagnosticsId ); 2869readByte += ParameterDecoder ::decodeAddress ( 2870parameterBlock .outputBuffer + readByte , 2871parameterBlock .outputBufferSize - readByte , 2872programLayoutId ); 2873 2874for (auto consumer :m_consumers ) 2875 { 2876consumer 2877-> ITypeConformance_getLayout (objectId ,targetIndex ,outDiagnosticsId ,programLayoutId ); 2878 } 2879} 2880 2881void SlangDecoder ::ITypeConformance_getSpecializationParamCount ( 2882ObjectID objectId , 2883ParameterBlock const & parameterBlock ) 2884{ 2885 (void )objectId ; 2886 (void )parameterBlock ; 2887slangRecordLog ( 2888LogLevel ::Debug , 2889"%s should not be called, it'a not recordd\n" , 2890__PRETTY_FUNCTION__ ); 2891} 2892 2893void SlangDecoder ::ITypeConformance_getEntryPointCode ( 2894ObjectID objectId , 2895ParameterBlock const & parameterBlock ) 2896{ 2897size_t readByte = 0 ; 2898int64_t entryPointIndex = 0 ; 2899int64_t targetIndex = 0 ; 2900readByte = ParameterDecoder ::decodeInt64 ( 2901parameterBlock .parameterBuffer , 2902parameterBlock .parameterBufferSize , 2903entryPointIndex ); 2904readByte += ParameterDecoder ::decodeInt64 ( 2905parameterBlock .parameterBuffer + readByte , 2906parameterBlock .parameterBufferSize - readByte , 2907targetIndex ); 2908 2909ObjectID outCodeId = 0 ; 2910ObjectID outDiagnosticsId = 0 ; 2911readByte = ParameterDecoder ::decodeAddress ( 2912parameterBlock .outputBuffer , 2913parameterBlock .outputBufferSize , 2914outCodeId ); 2915readByte += ParameterDecoder ::decodeAddress ( 2916parameterBlock .outputBuffer + readByte , 2917parameterBlock .outputBufferSize - readByte , 2918outDiagnosticsId ); 2919 2920for (auto consumer :m_consumers ) 2921 { 2922consumer -> ITypeConformance_getEntryPointCode ( 2923objectId , 2924entryPointIndex , 2925targetIndex , 2926outCodeId , 2927outDiagnosticsId ); 2928 } 2929} 2930 2931void SlangDecoder ::ITypeConformance_getTargetCode ( 2932ObjectID objectId , 2933ParameterBlock const & parameterBlock ) 2934{ 2935size_t readByte = 0 ; 2936int64_t targetIndex = 0 ; 2937readByte = ParameterDecoder ::decodeInt64 ( 2938parameterBlock .parameterBuffer , 2939parameterBlock .parameterBufferSize , 2940targetIndex ); 2941 2942ObjectID outCodeId = 0 ; 2943ObjectID outDiagnosticsId = 0 ; 2944readByte = ParameterDecoder ::decodeAddress ( 2945parameterBlock .outputBuffer , 2946parameterBlock .outputBufferSize , 2947outCodeId ); 2948readByte += ParameterDecoder ::decodeAddress ( 2949parameterBlock .outputBuffer + readByte , 2950parameterBlock .parameterBufferSize - readByte , 2951outDiagnosticsId ); 2952 2953for (auto consumer :m_consumers ) 2954 { 2955consumer 2956-> ITypeConformance_getTargetCode (objectId ,targetIndex ,outCodeId ,outDiagnosticsId ); 2957 } 2958} 2959 2960void SlangDecoder ::ITypeConformance_getResultAsFileSystem ( 2961ObjectID objectId , 2962ParameterBlock const & parameterBlock ) 2963{ 2964size_t readByte = 0 ; 2965int64_t entryPointIndex = 0 ; 2966int64_t targetIndex = 0 ; 2967readByte = ParameterDecoder ::decodeInt64 ( 2968parameterBlock .parameterBuffer , 2969parameterBlock .parameterBufferSize , 2970entryPointIndex ); 2971readByte += ParameterDecoder ::decodeInt64 ( 2972parameterBlock .parameterBuffer + readByte , 2973parameterBlock .parameterBufferSize - readByte , 2974targetIndex ); 2975 2976ObjectID outFileSystemId = 0 ; 2977readByte = ParameterDecoder ::decodeAddress ( 2978parameterBlock .outputBuffer , 2979parameterBlock .outputBufferSize , 2980outFileSystemId ); 2981 2982for (auto consumer :m_consumers ) 2983 { 2984consumer -> ITypeConformance_getResultAsFileSystem ( 2985objectId , 2986entryPointIndex , 2987targetIndex , 2988outFileSystemId ); 2989 } 2990} 2991 2992void SlangDecoder ::ITypeConformance_getEntryPointHash ( 2993ObjectID objectId , 2994ParameterBlock const & parameterBlock ) 2995{ 2996size_t readByte = 0 ; 2997int64_t entryPointIndex = 0 ; 2998int64_t targetIndex = 0 ; 2999readByte = ParameterDecoder ::decodeInt64 ( 3000parameterBlock .parameterBuffer , 3001parameterBlock .parameterBufferSize , 3002entryPointIndex ); 3003readByte += ParameterDecoder ::decodeInt64 ( 3004parameterBlock .parameterBuffer + readByte , 3005parameterBlock .parameterBufferSize - readByte , 3006targetIndex ); 3007 3008ObjectID outBlobId = 0 ; 3009readByte = ParameterDecoder ::decodeAddress ( 3010parameterBlock .outputBuffer , 3011parameterBlock .outputBufferSize , 3012outBlobId ); 3013 3014for (auto consumer :m_consumers ) 3015 { 3016consumer 3017-> ITypeConformance_getEntryPointHash (objectId ,entryPointIndex ,targetIndex ,outBlobId ); 3018 } 3019} 3020 3021void SlangDecoder ::ITypeConformance_specialize ( 3022ObjectID objectId , 3023ParameterBlock const & parameterBlock ) 3024{ 3025slangRecordLog ( 3026LogLevel ::Error , 3027"%s: The shader reflection interfaces are not recordd\n" , 3028__PRETTY_FUNCTION__ ); 3029 3030size_t readByte = 0 ; 3031int64_t specializationArgCount = 0 ; 3032readByte = ParameterDecoder ::decodeInt64 ( 3033parameterBlock .parameterBuffer , 3034parameterBlock .parameterBufferSize , 3035specializationArgCount ); 3036 3037 std::vector < slang::SpecializationArg > specializationArgs ; 3038 3039uint32_t arraySize = 0 ; 3040readByte += ParameterDecoder ::decodeUint32 ( 3041parameterBlock .parameterBuffer + readByte , 3042parameterBlock .parameterBufferSize - readByte , 3043arraySize ); 3044 3045SLANG_RECORD_ASSERT (arraySize == specializationArgCount ); 3046 3047specializationArgs .resize (specializationArgCount ); 3048readByte += ParameterDecoder ::decodeStructArray ( 3049parameterBlock .parameterBuffer + readByte , 3050parameterBlock .parameterBufferSize - readByte , 3051specializationArgs .data (), 3052specializationArgCount ); 3053 3054ObjectID outSpecializedComponentTypeId = 0 ; 3055ObjectID outDiagnosticsId = 0 ; 3056readByte = ParameterDecoder ::decodeAddress ( 3057parameterBlock .outputBuffer , 3058parameterBlock .outputBufferSize , 3059outSpecializedComponentTypeId ); 3060readByte += ParameterDecoder ::decodeAddress ( 3061parameterBlock .outputBuffer + readByte , 3062parameterBlock .outputBufferSize - readByte , 3063outDiagnosticsId ); 3064 3065for (auto consumer :m_consumers ) 3066 { 3067consumer -> IModule_specialize ( 3068objectId , 3069specializationArgs .data (), 3070specializationArgCount , 3071outSpecializedComponentTypeId , 3072outDiagnosticsId ); 3073 } 3074} 3075 3076void SlangDecoder ::ITypeConformance_link (ObjectID objectId ,ParameterBlock const & parameterBlock ) 3077{ 3078size_t readByte = 0 ; 3079ObjectID outLinkedComponentTypeId = 0 ; 3080ObjectID outDiagnosticsId = 0 ; 3081readByte = ParameterDecoder ::decodeAddress ( 3082parameterBlock .outputBuffer , 3083parameterBlock .outputBufferSize , 3084outLinkedComponentTypeId ); 3085readByte += ParameterDecoder ::decodeAddress ( 3086parameterBlock .outputBuffer + readByte , 3087parameterBlock .outputBufferSize - readByte , 3088outDiagnosticsId ); 3089 3090for (auto consumer :m_consumers ) 3091 { 3092consumer -> ITypeConformance_link (objectId ,outLinkedComponentTypeId ,outDiagnosticsId ); 3093 } 3094} 3095 3096void SlangDecoder ::ITypeConformance_getEntryPointHostCallable ( 3097ObjectID objectId , 3098ParameterBlock const & parameterBlock ) 3099{ 3100size_t readByte = 0 ; 3101int32_t entryPointIndex = 0 ; 3102int32_t targetIndex = 0 ; 3103readByte = ParameterDecoder ::decodeInt32 ( 3104parameterBlock .parameterBuffer , 3105parameterBlock .parameterBufferSize , 3106entryPointIndex ); 3107readByte += ParameterDecoder ::decodeInt32 ( 3108parameterBlock .parameterBuffer + readByte , 3109parameterBlock .parameterBufferSize - readByte , 3110targetIndex ); 3111 3112ObjectID outSharedLibraryId = 0 ; 3113ObjectID outDiagnosticsId = 0 ; 3114readByte = ParameterDecoder ::decodeAddress ( 3115parameterBlock .outputBuffer , 3116parameterBlock .outputBufferSize , 3117outSharedLibraryId ); 3118readByte += ParameterDecoder ::decodeAddress ( 3119parameterBlock .outputBuffer + readByte , 3120parameterBlock .outputBufferSize - readByte , 3121outDiagnosticsId ); 3122 3123for (auto consumer :m_consumers ) 3124 { 3125consumer -> ITypeConformance_getEntryPointHostCallable ( 3126objectId , 3127entryPointIndex , 3128targetIndex , 3129outSharedLibraryId , 3130outDiagnosticsId ); 3131 } 3132} 3133 3134void SlangDecoder ::ITypeConformance_renameEntryPoint ( 3135ObjectID objectId , 3136ParameterBlock const & parameterBlock ) 3137{ 3138StringDecoder newName ; 3139ParameterDecoder ::decodeString ( 3140parameterBlock .parameterBuffer , 3141parameterBlock .parameterBufferSize , 3142newName ); 3143 3144ObjectID outEntryPointId = 0 ; 3145ParameterDecoder ::decodeAddress ( 3146parameterBlock .outputBuffer , 3147parameterBlock .outputBufferSize , 3148outEntryPointId ); 3149 3150for (auto consumer :m_consumers ) 3151 { 3152consumer -> ITypeConformance_renameEntryPoint ( 3153objectId , 3154newName .getPointer (), 3155outEntryPointId ); 3156 } 3157} 3158 3159void SlangDecoder ::ITypeConformance_linkWithOptions ( 3160ObjectID objectId , 3161ParameterBlock const & parameterBlock ) 3162{ 3163size_t readByte = 0 ; 3164uint32_t compilerOptionEntryCount = 0 ; 3165readByte = ParameterDecoder ::decodeUint32 ( 3166parameterBlock .parameterBuffer , 3167parameterBlock .parameterBufferSize , 3168compilerOptionEntryCount ); 3169 3170 std::vector < slang::CompilerOptionEntry > compilerOptionEntries ; 3171 3172uint32_t arrayCount = 0 ; 3173readByte += ParameterDecoder ::decodeUint32 ( 3174parameterBlock .parameterBuffer + readByte , 3175parameterBlock .parameterBufferSize - readByte , 3176arrayCount ); 3177 3178SLANG_RECORD_ASSERT (arrayCount == compilerOptionEntryCount ); 3179compilerOptionEntries .resize (compilerOptionEntryCount ); 3180 3181readByte += ParameterDecoder ::decodeStructArray ( 3182parameterBlock .parameterBuffer + readByte , 3183parameterBlock .parameterBufferSize - readByte , 3184compilerOptionEntries .data (), 3185compilerOptionEntryCount ); 3186 3187ObjectID outLinkedComponentTypeId = 0 ; 3188ObjectID outDiagnosticsId = 0 ; 3189readByte = ParameterDecoder ::decodeAddress ( 3190parameterBlock .outputBuffer , 3191parameterBlock .outputBufferSize , 3192outLinkedComponentTypeId ); 3193readByte += ParameterDecoder ::decodeAddress ( 3194parameterBlock .outputBuffer + readByte , 3195parameterBlock .outputBufferSize - readByte , 3196outDiagnosticsId ); 3197 3198for (auto consumer :m_consumers ) 3199 { 3200consumer -> ITypeConformance_linkWithOptions ( 3201objectId , 3202outLinkedComponentTypeId , 3203compilerOptionEntryCount , 3204compilerOptionEntries .data (), 3205outDiagnosticsId ); 3206 } 3207} 3208 3209void SlangDecoder ::IComponentType2_getTargetCompileResult ( 3210ObjectID objectId , 3211ParameterBlock const & parameterBlock ) 3212{ 3213size_t readByte = 0 ; 3214int64_t targetIndex = 0 ; 3215readByte = ParameterDecoder ::decodeInt64 ( 3216parameterBlock .parameterBuffer , 3217parameterBlock .parameterBufferSize , 3218targetIndex ); 3219 3220ObjectID outCompileResultId = 0 ; 3221ObjectID outDiagnosticsId = 0 ; 3222readByte = ParameterDecoder ::decodeAddress ( 3223parameterBlock .outputBuffer , 3224parameterBlock .outputBufferSize , 3225outCompileResultId ); 3226readByte += ParameterDecoder ::decodeAddress ( 3227parameterBlock .outputBuffer + readByte , 3228parameterBlock .outputBufferSize - readByte , 3229outDiagnosticsId ); 3230 3231for (auto consumer :m_consumers ) 3232 { 3233consumer -> IComponentType2_getTargetCompileResult ( 3234objectId , 3235targetIndex , 3236outCompileResultId , 3237outDiagnosticsId ); 3238 } 3239} 3240 3241void SlangDecoder ::IComponentType2_getEntryPointCompileResult ( 3242ObjectID objectId , 3243ParameterBlock const & parameterBlock ) 3244{ 3245size_t readByte = 0 ; 3246int64_t targetIndex = 0 ; 3247int64_t entryPointIndex = 0 ; 3248readByte = ParameterDecoder ::decodeInt64 ( 3249parameterBlock .parameterBuffer , 3250parameterBlock .parameterBufferSize , 3251targetIndex ); 3252readByte += ParameterDecoder ::decodeInt64 ( 3253parameterBlock .parameterBuffer + readByte , 3254parameterBlock .parameterBufferSize - readByte , 3255entryPointIndex ); 3256 3257ObjectID outCompileResultId = 0 ; 3258ObjectID outDiagnosticsId = 0 ; 3259readByte = ParameterDecoder ::decodeAddress ( 3260parameterBlock .outputBuffer , 3261parameterBlock .outputBufferSize , 3262outCompileResultId ); 3263readByte += ParameterDecoder ::decodeAddress ( 3264parameterBlock .outputBuffer + readByte , 3265parameterBlock .outputBufferSize - readByte , 3266outDiagnosticsId ); 3267 3268for (auto consumer :m_consumers ) 3269 { 3270consumer -> IComponentType2_getEntryPointCompileResult ( 3271objectId , 3272entryPointIndex , 3273targetIndex , 3274outCompileResultId , 3275outDiagnosticsId ); 3276 } 3277} 3278}// namespace SlangRecord