yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
8000e0ede
master
1#include "slang-global-session.h" 2 3#include "../../slang/slang-compiler.h" 4#include "../util/record-utility.h" 5#include "slang-filesystem.h" 6#include "slang-session.h" 7 8namespace SlangRecord 9{ 10// constructor is called in slang_createGlobalSession 11GlobalSessionRecorder ::GlobalSessionRecorder ( 12const SlangGlobalSessionDesc * desc , 13 slang::IGlobalSession * session ) 14 :m_actualGlobalSession (session ) 15{ 16SLANG_RECORD_ASSERT (m_actualGlobalSession != nullptr ); 17 18m_globalSessionHandle = 19reinterpret_cast < SlangRecord ::AddressFormat > (m_actualGlobalSession .get ()); 20m_recordManager = new RecordManager (m_globalSessionHandle ); 21 22// We will use the address of the global session as the filename for the record manager 23// to make it unique for each global session. 24// record slang::createGlobalSession 25 26ParameterRecorder * recorder {}; 27 { 28recorder = m_recordManager -> beginMethodRecord ( 29ApiCallId ::CreateGlobalSession , 30g_globalFunctionHandle ); 31recorder -> recordStruct (* desc ); 32recorder = m_recordManager -> endMethodRecord (); 33 } 34 35recorder -> recordAddress (m_actualGlobalSession ); 36m_recordManager -> apendOutput (); 37} 38 39SLANG_NO_THROW SlangResult SLANG_MCALL 40GlobalSessionRecorder ::queryInterface (SlangUUID const & uuid ,void ** outObject ) 41{ 42if (uuid == Session ::getTypeGuid ()) 43 { 44// no add-ref here, the query will cause the inner session to handle the add-ref. 45this -> m_actualGlobalSession -> queryInterface (uuid ,outObject ); 46return SLANG_OK ; 47 } 48 49if (uuid == ISlangUnknown ::getTypeGuid ()&& uuid == IGlobalSession ::getTypeGuid ()) 50 { 51addReference (); 52* outObject = static_cast < slang::IGlobalSession *> (this ); 53return SLANG_OK ; 54 } 55 56return SLANG_E_NO_INTERFACE ; 57} 58 59SLANG_NO_THROW SlangResult SLANG_MCALL 60GlobalSessionRecorder ::createSession (slang::SessionDesc const & desc , slang::ISession ** outSession ) 61{ 62setLogLevel (); 63slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 64 65 slang::ISession * actualSession = nullptr ; 66 67ParameterRecorder * recorder {}; 68 { 69recorder = m_recordManager -> beginMethodRecord ( 70ApiCallId ::IGlobalSession_createSession , 71m_globalSessionHandle ); 72recorder -> recordStruct (desc ); 73recorder = m_recordManager -> endMethodRecord (); 74 } 75 76SlangResult res = m_actualGlobalSession -> createSession (desc ,& actualSession ); 77 78 {// record output 79recorder -> recordAddress (actualSession ); 80m_recordManager -> apendOutput (); 81 } 82 83if (actualSession != nullptr ) 84 { 85// reset the file system to our record file system. After createSession() call, 86// the Linkage will set to user provided file system or slang default file system. 87// We need to reset it to our record file system 88Slang ::Linkage * linkage = static_cast < Linkage *> (actualSession ); 89FileSystemRecorder * fileSystemRecord = 90new FileSystemRecorder (linkage -> getFileSystemExt (),m_recordManager .get ()); 91 92Slang ::ComPtr < FileSystemRecorder > resultFileSystemRecorder (fileSystemRecord ); 93linkage -> setFileSystem (resultFileSystemRecorder .detach ()); 94 95SessionRecorder * sessionRecord = new SessionRecorder (actualSession ,m_recordManager .get ()); 96Slang ::ComPtr < SessionRecorder > result (sessionRecord ); 97* outSession = result .detach (); 98 } 99 100return res ; 101} 102 103SLANG_NO_THROW SlangProfileID SLANG_MCALL GlobalSessionRecorder ::findProfile (char const * name ) 104{ 105slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 106 107ParameterRecorder * recorder {}; 108 { 109recorder = m_recordManager -> beginMethodRecord ( 110ApiCallId ::IGlobalSession_findProfile , 111m_globalSessionHandle ); 112recorder -> recordString (name ); 113recorder = m_recordManager -> endMethodRecord (); 114 } 115 116SlangProfileID profileId = m_actualGlobalSession -> findProfile (name ); 117return profileId ; 118} 119 120SLANG_NO_THROW void SLANG_MCALL 121GlobalSessionRecorder ::setDownstreamCompilerPath (SlangPassThrough passThrough ,char const * path ) 122{ 123slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 124 125ParameterRecorder * recorder {}; 126 { 127recorder = m_recordManager -> beginMethodRecord ( 128ApiCallId ::IGlobalSession_setDownstreamCompilerPath , 129m_globalSessionHandle ); 130recorder -> recordEnumValue (passThrough ); 131recorder -> recordString (path ); 132m_recordManager -> endMethodRecord (); 133 } 134 135m_actualGlobalSession -> setDownstreamCompilerPath (passThrough ,path ); 136} 137 138SLANG_NO_THROW void SLANG_MCALL GlobalSessionRecorder ::setDownstreamCompilerPrelude ( 139SlangPassThrough inPassThrough , 140char const * prelude ) 141{ 142slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 143 144ParameterRecorder * recorder {}; 145 { 146recorder = m_recordManager -> beginMethodRecord ( 147ApiCallId ::IGlobalSession_setDownstreamCompilerPrelude , 148m_globalSessionHandle ); 149recorder -> recordEnumValue (inPassThrough ); 150recorder -> recordString (prelude ); 151m_recordManager -> endMethodRecord (); 152 } 153 154m_actualGlobalSession -> setDownstreamCompilerPrelude (inPassThrough ,prelude ); 155} 156 157SLANG_NO_THROW void SLANG_MCALL GlobalSessionRecorder ::getDownstreamCompilerPrelude ( 158SlangPassThrough inPassThrough , 159ISlangBlob ** outPrelude ) 160{ 161slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 162 163ParameterRecorder * recorder {}; 164 { 165recorder = m_recordManager -> beginMethodRecord ( 166ApiCallId ::IGlobalSession_getDownstreamCompilerPrelude , 167m_globalSessionHandle ); 168recorder -> recordEnumValue (inPassThrough ); 169recorder = m_recordManager -> endMethodRecord (); 170 } 171 172m_actualGlobalSession -> getDownstreamCompilerPrelude (inPassThrough ,outPrelude ); 173 174 { 175recorder -> recordAddress (* outPrelude ); 176m_recordManager -> apendOutput (); 177 } 178} 179 180SLANG_NO_THROW const char * SLANG_MCALL GlobalSessionRecorder ::getBuildTagString () 181{ 182slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 183 184// No need to record this function. It's just a query function and it won't impact the internal 185// state. 186const char * resStr = m_actualGlobalSession -> getBuildTagString (); 187return resStr ; 188} 189 190SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder ::setDefaultDownstreamCompiler ( 191SlangSourceLanguage sourceLanguage , 192SlangPassThrough defaultCompiler ) 193{ 194slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 195 196ParameterRecorder * recorder {}; 197 { 198recorder = m_recordManager -> beginMethodRecord ( 199ApiCallId ::IGlobalSession_setDefaultDownstreamCompiler , 200m_globalSessionHandle ); 201recorder -> recordEnumValue (sourceLanguage ); 202recorder -> recordEnumValue (defaultCompiler ); 203recorder = m_recordManager -> endMethodRecord (); 204 } 205 206SlangResult res = 207m_actualGlobalSession -> setDefaultDownstreamCompiler (sourceLanguage ,defaultCompiler ); 208return res ; 209} 210 211SLANG_NO_THROW SlangPassThrough SLANG_MCALL 212GlobalSessionRecorder ::getDefaultDownstreamCompiler (SlangSourceLanguage sourceLanguage ) 213{ 214slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 215 216ParameterRecorder * recorder {}; 217 { 218recorder = m_recordManager -> beginMethodRecord ( 219ApiCallId ::IGlobalSession_getDefaultDownstreamCompiler , 220m_globalSessionHandle ); 221recorder -> recordEnumValue (sourceLanguage ); 222recorder = m_recordManager -> endMethodRecord (); 223 } 224 225SlangPassThrough passThrough = 226m_actualGlobalSession -> getDefaultDownstreamCompiler (sourceLanguage ); 227return passThrough ; 228} 229 230SLANG_NO_THROW void SLANG_MCALL 231GlobalSessionRecorder ::setLanguagePrelude (SlangSourceLanguage inSourceLanguage ,char const * prelude ) 232{ 233slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 234 235ParameterRecorder * recorder {}; 236 { 237recorder = m_recordManager -> beginMethodRecord ( 238ApiCallId ::IGlobalSession_setLanguagePrelude , 239m_globalSessionHandle ); 240recorder -> recordEnumValue (inSourceLanguage ); 241recorder -> recordString (prelude ); 242recorder = m_recordManager -> endMethodRecord (); 243 } 244 245m_actualGlobalSession -> setLanguagePrelude (inSourceLanguage ,prelude ); 246} 247 248SLANG_NO_THROW void SLANG_MCALL GlobalSessionRecorder ::getLanguagePrelude ( 249SlangSourceLanguage inSourceLanguage , 250ISlangBlob ** outPrelude ) 251{ 252slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 253 254ParameterRecorder * recorder {}; 255 { 256recorder = m_recordManager -> beginMethodRecord ( 257ApiCallId ::IGlobalSession_getLanguagePrelude , 258m_globalSessionHandle ); 259recorder -> recordEnumValue (inSourceLanguage ); 260recorder = m_recordManager -> endMethodRecord (); 261 } 262 263m_actualGlobalSession -> getLanguagePrelude (inSourceLanguage ,outPrelude ); 264 265 { 266recorder -> recordAddress (* outPrelude ); 267m_recordManager -> apendOutput (); 268 } 269} 270 271SLANG_NO_THROW SlangResult SLANG_MCALL 272GlobalSessionRecorder ::createCompileRequest (slang::ICompileRequest ** outCompileRequest ) 273{ 274slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 275 276ParameterRecorder * recorder {}; 277 { 278recorder = m_recordManager -> beginMethodRecord ( 279ApiCallId ::IGlobalSession_createCompileRequest , 280m_globalSessionHandle ); 281recorder = m_recordManager -> endMethodRecord (); 282 } 283 284SLANG_ALLOW_DEPRECATED_BEGIN 285SlangResult res = m_actualGlobalSession -> createCompileRequest (outCompileRequest ); 286SLANG_ALLOW_DEPRECATED_END 287 288 { 289recorder -> recordAddress (* outCompileRequest ); 290m_recordManager -> apendOutput (); 291 } 292 293return res ; 294} 295 296SLANG_NO_THROW void SLANG_MCALL 297GlobalSessionRecorder ::addBuiltins (char const * sourcePath ,char const * sourceString ) 298{ 299slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 300ParameterRecorder * recorder {}; 301 { 302recorder = m_recordManager -> beginMethodRecord ( 303ApiCallId ::IGlobalSession_addBuiltins , 304m_globalSessionHandle ); 305recorder -> recordString (sourcePath ); 306recorder -> recordString (sourceString ); 307recorder = m_recordManager -> endMethodRecord (); 308 } 309 310m_actualGlobalSession -> addBuiltins (sourcePath ,sourceString ); 311} 312 313SLANG_NO_THROW void SLANG_MCALL 314GlobalSessionRecorder ::setSharedLibraryLoader (ISlangSharedLibraryLoader * loader ) 315{ 316slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 317// TODO: Not sure if we need to record this function. Because this functions is something like 318// the file system override, it's provided by user code. So capturing it makes no sense. The 319// only way is to wrapper this interface by our own implementation, and record it there. 320m_actualGlobalSession -> setSharedLibraryLoader (loader ); 321} 322 323SLANG_NO_THROW ISlangSharedLibraryLoader * SLANG_MCALL 324GlobalSessionRecorder ::getSharedLibraryLoader () 325{ 326slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 327 328ParameterRecorder * recorder {}; 329 { 330recorder = m_recordManager -> beginMethodRecord ( 331ApiCallId ::IGlobalSession_getSharedLibraryLoader , 332m_globalSessionHandle ); 333recorder = m_recordManager -> endMethodRecord (); 334 } 335 336ISlangSharedLibraryLoader * loader = m_actualGlobalSession -> getSharedLibraryLoader (); 337 338 { 339recorder -> recordAddress (loader ); 340m_recordManager -> apendOutput (); 341 } 342return loader ; 343} 344 345SLANG_NO_THROW SlangResult SLANG_MCALL 346GlobalSessionRecorder ::checkCompileTargetSupport (SlangCompileTarget target ) 347{ 348// No need to record this function. It's just a query function and it won't impact the internal 349// state. 350slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 351SlangResult res = m_actualGlobalSession -> checkCompileTargetSupport (target ); 352return res ; 353} 354 355SLANG_NO_THROW SlangResult SLANG_MCALL 356GlobalSessionRecorder ::checkPassThroughSupport (SlangPassThrough passThrough ) 357{ 358// No need to record this function. It's just a query function and it won't impact the internal 359// state. 360slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 361SlangResult res = m_actualGlobalSession -> checkPassThroughSupport (passThrough ); 362return res ; 363} 364 365SLANG_NO_THROW SlangResult SLANG_MCALL 366GlobalSessionRecorder ::compileCoreModule (slang::CompileCoreModuleFlags flags ) 367{ 368slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 369 370ParameterRecorder * recorder {}; 371 { 372recorder = m_recordManager -> beginMethodRecord ( 373ApiCallId ::IGlobalSession_compileCoreModule , 374m_globalSessionHandle ); 375recorder -> recordEnumValue (flags ); 376m_recordManager -> endMethodRecord (); 377 } 378 379SlangResult res = m_actualGlobalSession -> compileCoreModule (flags ); 380return res ; 381} 382 383SLANG_NO_THROW SlangResult SLANG_MCALL 384GlobalSessionRecorder ::loadCoreModule (const void * coreModule ,size_t coreModuleSizeInBytes ) 385{ 386slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 387 388ParameterRecorder * recorder {}; 389 { 390recorder = m_recordManager -> beginMethodRecord ( 391ApiCallId ::IGlobalSession_loadCoreModule , 392m_globalSessionHandle ); 393recorder -> recordPointer (coreModule , false,coreModuleSizeInBytes ); 394m_recordManager -> endMethodRecord (); 395 } 396 397SlangResult res = m_actualGlobalSession -> loadCoreModule (coreModule ,coreModuleSizeInBytes ); 398return res ; 399} 400 401SLANG_NO_THROW SlangResult SLANG_MCALL 402GlobalSessionRecorder ::saveCoreModule (SlangArchiveType archiveType ,ISlangBlob ** outBlob ) 403{ 404slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 405 406ParameterRecorder * recorder {}; 407 { 408recorder = m_recordManager -> beginMethodRecord ( 409ApiCallId ::IGlobalSession_saveCoreModule , 410m_globalSessionHandle ); 411recorder -> recordEnumValue (archiveType ); 412recorder = m_recordManager -> endMethodRecord (); 413 } 414 415SlangResult res = m_actualGlobalSession -> saveCoreModule (archiveType ,outBlob ); 416 417 { 418recorder -> recordAddress (* outBlob ); 419m_recordManager -> apendOutput (); 420 } 421return res ; 422} 423 424SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder ::compileBuiltinModule ( 425 slang::BuiltinModuleName module , 426 slang::CompileCoreModuleFlags flags ) 427{ 428slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 429 430ParameterRecorder * recorder {}; 431 { 432recorder = m_recordManager -> beginMethodRecord ( 433ApiCallId ::IGlobalSession_compileBuiltinModule , 434m_globalSessionHandle ); 435recorder -> recordEnumValue (module ); 436recorder -> recordEnumValue (flags ); 437m_recordManager -> endMethodRecord (); 438 } 439 440SlangResult res = m_actualGlobalSession -> compileBuiltinModule (module ,flags ); 441return res ; 442} 443 444SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder ::loadBuiltinModule ( 445 slang::BuiltinModuleName module , 446const void * moduleData , 447size_t sizeInBytes ) 448{ 449slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 450 451ParameterRecorder * recorder {}; 452 { 453recorder = m_recordManager -> beginMethodRecord ( 454ApiCallId ::IGlobalSession_loadBuiltinModule , 455m_globalSessionHandle ); 456recorder -> recordEnumValue (module ); 457recorder -> recordPointer (moduleData , false,sizeInBytes ); 458m_recordManager -> endMethodRecord (); 459 } 460 461SlangResult res = m_actualGlobalSession -> loadBuiltinModule (module ,moduleData ,sizeInBytes ); 462return res ; 463} 464SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder ::saveBuiltinModule ( 465 slang::BuiltinModuleName module , 466SlangArchiveType archiveType , 467ISlangBlob ** outBlob ) 468{ 469slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 470 471ParameterRecorder * recorder {}; 472 { 473recorder = m_recordManager -> beginMethodRecord ( 474ApiCallId ::IGlobalSession_saveBuiltinModule , 475m_globalSessionHandle ); 476recorder -> recordEnumValue (module ); 477recorder -> recordEnumValue (archiveType ); 478recorder = m_recordManager -> endMethodRecord (); 479 } 480SlangResult res = m_actualGlobalSession -> saveBuiltinModule (module ,archiveType ,outBlob ); 481 { 482recorder -> recordAddress (* outBlob ); 483m_recordManager -> apendOutput (); 484 } 485return res ; 486} 487 488SLANG_NO_THROW SlangCapabilityID SLANG_MCALL GlobalSessionRecorder ::findCapability (char const * name ) 489{ 490// No need to record this function. It's just a query function and it won't impact the internal 491// state. 492slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 493SlangCapabilityID capId = m_actualGlobalSession -> findCapability (name ); 494return capId ; 495} 496 497SLANG_NO_THROW void SLANG_MCALL GlobalSessionRecorder ::setDownstreamCompilerForTransition ( 498SlangCompileTarget source , 499SlangCompileTarget target , 500SlangPassThrough compiler ) 501{ 502slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 503 504ParameterRecorder * recorder {}; 505 { 506recorder = m_recordManager -> beginMethodRecord ( 507ApiCallId ::IGlobalSession_setDownstreamCompilerForTransition , 508m_globalSessionHandle ); 509recorder -> recordEnumValue (source ); 510recorder -> recordEnumValue (target ); 511recorder -> recordEnumValue (compiler ); 512m_recordManager -> endMethodRecord (); 513 } 514 515m_actualGlobalSession -> setDownstreamCompilerForTransition (source ,target ,compiler ); 516} 517 518SLANG_NO_THROW SlangPassThrough SLANG_MCALL 519GlobalSessionRecorder ::getDownstreamCompilerForTransition ( 520SlangCompileTarget source , 521SlangCompileTarget target ) 522{ 523// No need to record this function. It's just a query function and it won't impact the internal 524// state. 525slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 526SlangPassThrough passThrough = 527m_actualGlobalSession -> getDownstreamCompilerForTransition (source ,target ); 528return passThrough ; 529} 530 531SLANG_NO_THROW void SLANG_MCALL 532GlobalSessionRecorder ::getCompilerElapsedTime (double * outTotalTime ,double * outDownstreamTime ) 533{ 534// No need to record this function. It's just a query function and it won't impact the internal 535// state. 536slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 537m_actualGlobalSession -> getCompilerElapsedTime (outTotalTime ,outDownstreamTime ); 538} 539 540SLANG_NO_THROW SlangResult SLANG_MCALL 541GlobalSessionRecorder ::setSPIRVCoreGrammar (char const * jsonPath ) 542{ 543slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 544 545ParameterRecorder * recorder {}; 546 { 547recorder = m_recordManager -> beginMethodRecord ( 548ApiCallId ::IGlobalSession_setSPIRVCoreGrammar , 549m_globalSessionHandle ); 550recorder -> recordString (jsonPath ); 551m_recordManager -> endMethodRecord (); 552 } 553 554SlangResult res = m_actualGlobalSession -> setSPIRVCoreGrammar (jsonPath ); 555return res ; 556} 557 558SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder ::parseCommandLineArguments ( 559int argc , 560const char * const * argv , 561 slang::SessionDesc * outSessionDesc , 562ISlangUnknown ** outAllocation ) 563{ 564slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 565 566ParameterRecorder * recorder {}; 567 { 568recorder = m_recordManager -> beginMethodRecord ( 569ApiCallId ::IGlobalSession_parseCommandLineArguments , 570m_globalSessionHandle ); 571recorder -> recordInt32 (argc ); 572recorder -> recordStringArray (argv ,argc ); 573recorder = m_recordManager -> endMethodRecord (); 574 } 575 576SlangResult res = 577m_actualGlobalSession -> parseCommandLineArguments (argc ,argv ,outSessionDesc ,outAllocation ); 578 579 { 580recorder -> recordAddress (outSessionDesc ); 581recorder -> recordAddress (* outAllocation ); 582m_recordManager -> apendOutput (); 583 } 584return res ; 585} 586 587SLANG_NO_THROW SlangResult SLANG_MCALL 588GlobalSessionRecorder ::getSessionDescDigest (slang::SessionDesc * sessionDesc ,ISlangBlob ** outBlob ) 589{ 590slangRecordLog (LogLevel ::Verbose ,"%p: %s\n" ,m_actualGlobalSession .get (),__PRETTY_FUNCTION__ ); 591 592ParameterRecorder * recorder {}; 593 { 594recorder = m_recordManager -> beginMethodRecord ( 595ApiCallId ::IGlobalSession_getSessionDescDigest , 596m_globalSessionHandle ); 597recorder -> recordStruct (* sessionDesc ); 598recorder = m_recordManager -> endMethodRecord (); 599 } 600 601SlangResult res = m_actualGlobalSession -> getSessionDescDigest (sessionDesc ,outBlob ); 602 603 { 604recorder -> recordAddress (* outBlob ); 605m_recordManager -> apendOutput (); 606 } 607return res ; 608} 609}// namespace SlangRecord